@@ -42,7 +42,7 @@ |
||
42 | 42 | foreach ($arrayOrObject as $key => $value) { |
43 | 43 | $out[$key] = $value; |
44 | 44 | } |
45 | - } elseif (is_object($arrayOrObject)){ |
|
45 | + } elseif (is_object($arrayOrObject)) { |
|
46 | 46 | $propList = get_object_vars($arrayOrObject); |
47 | 47 | foreach ($propList as $prop => $value) { |
48 | 48 | $arrayOrObject->{$prop} = $value; |
@@ -19,17 +19,17 @@ discard block |
||
19 | 19 | /* @var null|string */ |
20 | 20 | public $error; |
21 | 21 | |
22 | - public const EXCLUDE_DIRECTIVES = 1;//DONT include_directive |
|
23 | - public const IGNORE_COMMENTS = 2;//DONT include_comments |
|
24 | - public const NO_PARSING_EXCEPTIONS = 4;//THROW Exception on parsing Errors |
|
25 | - public const NO_OBJECT_FOR_DATE = 8;//DONT import date strings as dateTime Object |
|
22 | + public const EXCLUDE_DIRECTIVES = 1; //DONT include_directive |
|
23 | + public const IGNORE_COMMENTS = 2; //DONT include_comments |
|
24 | + public const NO_PARSING_EXCEPTIONS = 4; //THROW Exception on parsing Errors |
|
25 | + public const NO_OBJECT_FOR_DATE = 8; //DONT import date strings as dateTime Object |
|
26 | 26 | //privates |
27 | 27 | /* @var null|string */ |
28 | 28 | private $content; |
29 | 29 | /* @var null|string */ |
30 | 30 | private $filePath; |
31 | 31 | /* @var integer */ |
32 | - private $debug = 0;///TODO: determine levels |
|
32 | + private $debug = 0; ///TODO: determine levels |
|
33 | 33 | /* @var integer */ |
34 | 34 | private $options = 0; |
35 | 35 | //Exceptions messages |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | $previous = $root = new Node(); |
92 | 92 | $emptyLines = []; |
93 | 93 | try { |
94 | - $gen = function () use($source) { |
|
94 | + $gen = function() use($source) { |
|
95 | 95 | foreach ($source as $key => $value) { |
96 | 96 | yield ++$key => $value; |
97 | 97 | } |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | $target->add($n); |
118 | 118 | $previous = $n; |
119 | 119 | } |
120 | - if ($this->debug === 2) echo "\033[33mParsed Structure\033[0m\n",var_export($root, true); |
|
120 | + if ($this->debug === 2) echo "\033[33mParsed Structure\033[0m\n", var_export($root, true); |
|
121 | 121 | $out = Builder::buildContent($root, $this->debug); |
122 | 122 | return $out; |
123 | 123 | } catch (\Error|\Exception|\ParseError $e) { |