Completed
Push — master ( 11e974...988761 )
by Fenz
02:07
created
libs/Parser/Node/Contracts/ANode.php 1 patch
Upper-Lower-Casing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -132,17 +132,17 @@
 block discarded – undo
132 132
 					}
133 133
 				}
134 134
 				if( !isset($config['out']) ){
135
-					$this->document->throw("The $this->nodeType node $name only use in scope ".implode(',',array_keys($config['in'])));
135
+					$this->document->throw("the $this->nodeType node $name only use in scope ".implode(',',array_keys($config['in'])));
136 136
 				}
137 137
 				return $config['out'];
138 138
 			})($config);
139 139
 		}elseif( isset($config['only_in']) && (!$this->document->scope || !in_array($this->document->scope->scope,$config['only_in'])) ){
140
-			$this->document->throw("The $this->nodeType node $name only use in scope ".implode(',',$config['only_in']));
140
+			$this->document->throw("the $this->nodeType node $name only use in scope ".implode(',',$config['only_in']));
141 141
 		}elseif( isset($config['not_in']) && (!$this->document->scope || !in_array($this->document->scope->scope,$config['not_in'])) ){
142
-			$this->document->throw("The $this->nodeType node $name not use in scope ".implode(',',$config['not_in']));
142
+			$this->document->throw("the $this->nodeType node $name not use in scope ".implode(',',$config['not_in']));
143 143
 		}
144 144
 
145
-		if( !is_array($config) ){$this->document->throw("The $this->nodeType node $name is not supported.");}
145
+		if( !is_array($config) ){$this->document->throw("the $this->nodeType node $name is not supported.");}
146 146
 
147 147
 		$this->config= $config;
148 148
 
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
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
 	{
129 129
 		$params= preg_split('/(?<!\\\\)\\|/',$this->line->pregGet('/^-[\w-:]+\((.*?)\)(?= |(\\{>)?$)/',1));
130 130
 
131
-		if( ($m= count($params)) != ($n= count($this->config['params'])) ){$this->document->throw("Tag $this->name has $n parameters $m given.");}
131
+		if( ($m= count($params)) != ($n= count($this->config['params'])) ){$this->document->throw("tag $this->name has $n parameters $m given.");}
132 132
 
133 133
 		array_map(function( $key, $value ){return $this->setAttribute($key,str_replace('\\|','|',$value));},$this->config['params'],$params);
134 134
 
@@ -282,7 +282,7 @@  discard block
 block discarded – undo
282 282
 	protected function setAttribute( string$key, string$value, string$condition=null ):self
283 283
 	{
284 284
 		if( isset($this->attributes[$key]) )
285
-			{ $this->document->throw("Attribute $key of $this->name cannot redeclare."); }
285
+			{ $this->document->throw("attribute $key of $this->name cannot redeclare."); }
286 286
 
287 287
 		$this->attributes[$key]=[
288 288
 			'value'=> $value,
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.
libs/Parser/Document.php 1 patch
Upper-Lower-Casing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -323,7 +323,7 @@  discard block
 block discarded – undo
323 323
 		}
324 324
 
325 325
 		$this->docType= $line->content;
326
-		$docTypeContent= $this->getConfig('doc_types') or $this->throw("DocType $this->docType is not supported");
326
+		$docTypeContent= $this->getConfig('doc_types') or $this->throw("doctype $this->docType is not supported");
327 327
 
328 328
 		$this->indentation= $this->htsl->getConfig('indentation',$this->docType) ?? ( function( $scalarOrFalse ){ return is_scalar($scalarOrFalse)?$scalarOrFalse:false; } )($this->htsl->getConfig('indentation'));
329 329
 
@@ -785,7 +785,7 @@  discard block
 block discarded – undo
785 785
 		}
786 786
 
787 787
 		if( isset($this->parent->sections[$section->name]) ){
788
-			$this->throw("Section {$section->name} already defined.");
788
+			$this->throw("section {$section->name} already defined.");
789 789
 		}
790 790
 
791 791
 		$this->currentSection= $section;
Please login to merge, or discard this patch.