Completed
Push — master ( c45521...844759 )
by stéphane
08:22
created
sources/Loader.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -15,10 +15,10 @@  discard block
 block discarded – undo
15 15
     //public
16 16
     /* @var null|string */
17 17
     public static $error;
18
-    public const IGNORE_DIRECTIVES = 1;//DONT include_directive
19
-    public const IGNORE_COMMENTS    = 2;//DONT include_comments
20
-    public const NO_PARSING_EXCEPTIONS = 4;//DONT throw Exception on parsing errors
21
-    public const NO_OBJECT_FOR_DATE = 8;//DONT import date strings as dateTime Object
18
+    public const IGNORE_DIRECTIVES = 1; //DONT include_directive
19
+    public const IGNORE_COMMENTS    = 2; //DONT include_comments
20
+    public const NO_PARSING_EXCEPTIONS = 4; //DONT throw Exception on parsing errors
21
+    public const NO_OBJECT_FOR_DATE = 8; //DONT import date strings as dateTime Object
22 22
 
23 23
     //privates
24 24
     /* @var null|false|array */
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
     /* @var null|string */
27 27
     private $filePath;
28 28
     /* @var integer */
29
-    private $debug = 0;///TODO: determine levels
29
+    private $debug = 0; ///TODO: determine levels
30 30
     /* @var integer */
31 31
     private $options = 0;
32 32
 
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
         $source = $this->content ?? preg_split("/\n/m", preg_replace('/(\r\n|\r)/', "\n", $strContent), 0, PREG_SPLIT_DELIM_CAPTURE);
93 93
         //TODO : be more permissive on $strContent values
94 94
         if (!is_array($source) || !count($source)) throw new \Exception(self::EXCEPTION_LINE_SPLIT);
95
-        return function () use($source) {
95
+        return function() use($source) {
96 96
             foreach ($source as $key => $value) {
97 97
                 yield ++$key => $value;
98 98
             }
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
                         break;
130 130
                     default: $target = $node->getTargetOnMoreIndent($previous);
131 131
                 }
132
-                if ($node->skipOnContext($target)) continue;//var_dump(get_class($target));
132
+                if ($node->skipOnContext($target)) continue; //var_dump(get_class($target));
133 133
                 $target->add($node);
134 134
                 $previous = $node;
135 135
             }
Please login to merge, or discard this patch.
examples/load_modify_save.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@
 block discarded – undo
1 1
 <?php
2 2
 namespace Dallgoot\Yaml;
3 3
 
4
-require_once __DIR__ . '/../../dependencies/autoload.php';
4
+require_once __DIR__.'/../../dependencies/autoload.php';
5 5
 
6 6
 use Dallgoot;
7 7
 
8
-$fileName = __DIR__ . '/../dummy.yml';
8
+$fileName = __DIR__.'/../dummy.yml';
9 9
 
10 10
 $yamlObject = Yaml::parseFile($fileName, $options = null, $debug = null);
11 11
 
Please login to merge, or discard this patch.