@@ -132,17 +132,17 @@ |
||
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 |
@@ -128,7 +128,7 @@ discard block |
||
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 |
||
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, |
@@ -262,7 +262,7 @@ discard block |
||
262 | 262 | } |
263 | 263 | |
264 | 264 | $this->docType= $line->content; |
265 | - $docTypeContent= $this->getConfig('doc_types') or $this->throw("DocType $this->docType is not supported"); |
|
265 | + $docTypeContent= $this->getConfig('doc_types') or $this->throw("doctype $this->docType is not supported"); |
|
266 | 266 | |
267 | 267 | $this->indentation= $this->htsl->getConfig('indentation',$this->docType) ?? ( function( $scalarOrFalse ){ return is_scalar($scalarOrFalse)?$scalarOrFalse:false; } )($this->htsl->getConfig('indentation')); |
268 | 268 | |
@@ -683,7 +683,7 @@ discard block |
||
683 | 683 | } |
684 | 684 | |
685 | 685 | if( isset($this->parent->sections[$section->name]) ){ |
686 | - $this->throw("Section $sectionName already defined."); |
|
686 | + $this->throw("section $sectionName already defined."); |
|
687 | 687 | } |
688 | 688 | |
689 | 689 | $this->currentSection= $section; |
@@ -26,7 +26,7 @@ |
||
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; |