Config: added native void return types to private functions

This commit is contained in:
Dylan K. Taylor 2020-01-18 17:46:25 +00:00
parent ab57914322
commit 7137b8a8a4

View File

@ -535,7 +535,7 @@ class Config{
/** /**
* @param string $content * @param string $content
*/ */
private function parseList(string $content){ private function parseList(string $content) : void{
foreach(explode("\n", trim(str_replace("\r\n", "\n", $content))) as $v){ foreach(explode("\n", trim(str_replace("\r\n", "\n", $content))) as $v){
$v = trim($v); $v = trim($v);
if($v == ""){ if($v == ""){
@ -565,7 +565,7 @@ class Config{
/** /**
* @param string $content * @param string $content
*/ */
private function parseProperties(string $content){ private function parseProperties(string $content) : void{
if(preg_match_all('/^\s*([a-zA-Z0-9\-_\.]+)[ \t]*=([^\r\n]*)/um', $content, $matches) > 0){ //false or 0 matches if(preg_match_all('/^\s*([a-zA-Z0-9\-_\.]+)[ \t]*=([^\r\n]*)/um', $content, $matches) > 0){ //false or 0 matches
foreach($matches[1] as $i => $k){ foreach($matches[1] as $i => $k){
$v = trim($matches[2][$i]); $v = trim($matches[2][$i]);