Completed
Pull Request — master (#1)
by Fenz
07:21
created
libs/Parser/Document.php 1 patch
Upper-Lower-Casing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -263,7 +263,7 @@  discard block
 block discarded – undo
263 263
         }
264 264
 
265 265
         $this->docType = $line->content;
266
-        $docTypeContent = $this->getConfig('doc_types') or $this->throw("DocType $this->docType is not supported");
266
+        $docTypeContent = $this->getConfig('doc_types') or $this->throw("doctype $this->docType is not supported");
267 267
 
268 268
         $this->indentation = $this->htsl->getConfig('indentation', $this->docType) ?? (function ($scalarOrFalse) {
269 269
             return is_scalar($scalarOrFalse) ? $scalarOrFalse : false;
@@ -689,7 +689,7 @@  discard block
 block discarded – undo
689 689
         }
690 690
 
691 691
         if (isset($this->parent->sections[$section->name])) {
692
-            $this->throw("Section $sectionName already defined.");
692
+            $this->throw("section $sectionName already defined.");
693 693
         }
694 694
 
695 695
         $this->currentSection = $section;
Please login to merge, or discard this patch.
libs/Parser/Node/TagNode.php 1 patch
Upper-Lower-Casing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
         $params = preg_split('/(?<!\\\\)\\|/', $this->line->pregGet('/^-[\w-:]+\((.*?)\)(?= |(\\{>)?$)/', 1));
137 137
 
138 138
         if (($m = count($params)) != ($n = count($this->config['params']))) {
139
-            $this->document->throw("Tag $this->name has $n parameters $m given.");
139
+            $this->document->throw("tag $this->name has $n parameters $m given.");
140 140
         }
141 141
 
142 142
         array_map(function ($key, $value) {
@@ -297,7 +297,7 @@  discard block
 block discarded – undo
297 297
     protected function setAttribute(string $key, string $value, string $condition = null):self
298 298
     {
299 299
         if (isset($this->attributes[$key])) {
300
-            $this->document->throw("Attribute $key of $this->name cannot redeclare.");
300
+            $this->document->throw("attribute $key of $this->name cannot redeclare.");
301 301
         }
302 302
 
303 303
         $this->attributes[$key] = [
Please login to merge, or discard this patch.
libs/Parser/Node/Contracts/ANode.php 1 patch
Upper-Lower-Casing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -134,19 +134,19 @@
 block discarded – undo
134 134
                     }
135 135
                 }
136 136
                 if (!isset($config['out'])) {
137
-                    $this->document->throw("The $this->nodeType node $name only use in scope ".implode(',', array_keys($config['in'])));
137
+                    $this->document->throw("the $this->nodeType node $name only use in scope ".implode(',', array_keys($config['in'])));
138 138
                 }
139 139
 
140 140
                 return $config['out'];
141 141
             })($config);
142 142
         } elseif (isset($config['only_in']) && (!$this->document->scope || !in_array($this->document->scope->scope, $config['only_in']))) {
143
-            $this->document->throw("The $this->nodeType node $name only use in scope ".implode(',', $config['only_in']));
143
+            $this->document->throw("the $this->nodeType node $name only use in scope ".implode(',', $config['only_in']));
144 144
         } elseif (isset($config['not_in']) && (!$this->document->scope || !in_array($this->document->scope->scope, $config['not_in']))) {
145
-            $this->document->throw("The $this->nodeType node $name not use in scope ".implode(',', $config['not_in']));
145
+            $this->document->throw("the $this->nodeType node $name not use in scope ".implode(',', $config['not_in']));
146 146
         }
147 147
 
148 148
         if (!is_array($config)) {
149
-            $this->document->throw("The $this->nodeType node $name is not supported.");
149
+            $this->document->throw("the $this->nodeType node $name is not supported.");
150 150
         }
151 151
 
152 152
         $this->config = $config;
Please login to merge, or discard this patch.
libs/ReadingBuffer/FileBuffer.php 1 patch
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
         substr($filePath, -5) === '.htsl' or $filePath .= '.htsl';
27 27
 
28 28
         if (!file_exists($filePath) || !is_file($filePath)) {
29
-            throw new \Exception("File $filePath not exists.", 1);
29
+            throw new \Exception("file $filePath not exists.", 1);
30 30
         }
31 31
 
32 32
         $this->filePath = $filePath;
Please login to merge, or discard this patch.