Completed
Push — master ( 92bccd...8fac4c )
by Fenz
02:24
created
libs/Htsl.php 1 patch
Braces   +5 added lines, -8 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
 
68 68
 		if( $toFile ){
69 69
 			return file_put_contents($toFile,$result);
70
-		}else{
70
+		} else{
71 71
 			return $result;
72 72
 		}
73 73
 	}
@@ -159,15 +159,12 @@  discard block
 block discarded – undo
159 159
 
160 160
 		if( '/'===$filePath{0} ){
161 161
 			if( is_null($path) )
162
-				{ return $filePath; }
163
-			else
162
+				{ return $filePath; } else
164 163
 				{ return $this->basePath.$filePath; }
165
-		}else{
164
+		} else{
166 165
 			if( !strlen($path) )
167
-				{ return $this->basePath.'/'.$filePath; }
168
-			elseif( '/'===substr($path,-1) )
169
-				{ return $path.$filePath; }
170
-			else
166
+				{ return $this->basePath.'/'.$filePath; } elseif( '/'===substr($path,-1) )
167
+				{ return $path.$filePath; } else
171 168
 				{ return $path.'/'.$filePath; }
172 169
 		}
173 170
 
Please login to merge, or discard this patch.
libs/Helper/TSetter.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
 	{
17 17
 		if( is_callable([static::class, $setter= 'set'.implode('',array_map('ucfirst',explode('_',$attribute))),]) ){
18 18
 			return static::$setter($value);
19
-		}else{
19
+		} else{
20 20
 			throw new \Exception(static::class.' has no attribute named '.$attribute);
21 21
 		}
22 22
 	}
Please login to merge, or discard this patch.
libs/Parser/Node/Contracts/ANode.php 1 patch
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -136,9 +136,9 @@
 block discarded – undo
136 136
 				}
137 137
 				return $config['out'];
138 138
 			})($config);
139
-		}elseif( isset($config['only_in']) && (!$this->document->scope || !in_array($this->document->scope->scope,$config['only_in'])) ){
139
+		} elseif( isset($config['only_in']) && (!$this->document->scope || !in_array($this->document->scope->scope,$config['only_in'])) ){
140 140
 			$this->document->throw("The $this->nodeType node $name only use in scope ".implode(',',$config['only_in']));
141
-		}elseif( isset($config['not_in']) && (!$this->document->scope || !in_array($this->document->scope->scope,$config['not_in'])) ){
141
+		} elseif( isset($config['not_in']) && (!$this->document->scope || !in_array($this->document->scope->scope,$config['not_in'])) ){
142 142
 			$this->document->throw("The $this->nodeType node $name not use in scope ".implode(',',$config['not_in']));
143 143
 		}
144 144
 
Please login to merge, or discard this patch.
libs/Parser/Node/TagNode.php 1 patch
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -161,11 +161,11 @@
 block discarded – undo
161 161
 		if( strlen($link) ){
162 162
 			if( isset($this->config['target']) && ':'===$link{0} ){
163 163
 				$this->setAttribute($this->config['link'],'javascript'.$link);
164
-			}elseif( '//'===($firstTwoLetters=substr($link,0,2)) ){
164
+			} elseif( '//'===($firstTwoLetters=substr($link,0,2)) ){
165 165
 				$this->setAttribute($this->config['link'],'http:'.$link);
166
-			}elseif( '\\\\'===$firstTwoLetters ){
166
+			} elseif( '\\\\'===$firstTwoLetters ){
167 167
 				$this->setAttribute($this->config['link'],'https://'.substr($link,2));
168
-			}else{
168
+			} else{
169 169
 				$this->setAttribute($this->config['link'],$this->checkExpression($link));
170 170
 			}
171 171
 		}
Please login to merge, or discard this patch.
libs/Helper/TGetter.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
 	{
17 17
 		if( is_callable([static::class, $setter= 'set'.implode('',array_map('ucfirst',explode('_',$attribute))),]) ){
18 18
 			return static::$setter($value);
19
-		}else{
19
+		} else{
20 20
 			throw new \Exception(static::class.' has no attribute named '.$attribute);
21 21
 		}
22 22
 	}
Please login to merge, or discard this patch.
libs/Embedment/Contracts/AEmbedment.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,9 @@
 block discarded – undo
48 48
 	/**
49 49
 	 * Real constructor to be rewrite.
50 50
 	 */
51
-	protected function construct(){}
51
+	protected function construct()
52
+	{
53
+}
52 54
 
53 55
 	/**
54 56
 	 * Parsing line.
Please login to merge, or discard this patch.
libs/Parser/Document.php 1 patch
Braces   +10 added lines, -8 removed lines patch added patch discarded remove patch
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
 			$this->parent= $parent;
192 192
 			$this->docType= $parent->docType;
193 193
 			$this->indentation= $parent->indentation;
194
-		}else{
194
+		} else{
195 195
 			$this->parseFirstLine();
196 196
 		}
197 197
 	}
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
 	{
237 237
 		if( $this->parent ){
238 238
 			return $this->execute()->parent->getContent();
239
-		}else{
239
+		} else{
240 240
 			return $this->execute()->content;
241 241
 		}
242 242
 	}
@@ -374,7 +374,7 @@  discard block
 block discarded – undo
374 374
 
375 375
 			if( $this->embedment ){
376 376
 				$this->embeddingParse($line);
377
-			}else{
377
+			} else{
378 378
 				$this->parseLine($line);
379 379
 			}
380 380
 		}
@@ -401,7 +401,7 @@  discard block
 block discarded – undo
401 401
 	{
402 402
 		if( $line->content==='<}' ){
403 403
 			$this->breakEmbedding();
404
-		}else{
404
+		} else{
405 405
 			$this->embedment->parseLine($line->getSubIndentLine());
406 406
 		}
407 407
 		return $this;
@@ -864,9 +864,9 @@  discard block
 block discarded – undo
864 864
 
865 865
 		if( $level<=0 ){
866 866
 			$this->closeNodes(-$level);
867
-		}elseif( $level==1 ){
867
+		} elseif( $level==1 ){
868 868
 			$this->level+= 1;
869
-		}else{
869
+		} else{
870 870
 			$this->throw('Indent error.');
871 871
 		}
872 872
 
@@ -902,7 +902,9 @@  discard block
 block discarded – undo
902 902
 	 */
903 903
 	protected function closeNodes( int$level=0 ):self
904 904
 	{
905
-		if( empty($this->openedNodes) ) return $this;
905
+		if( empty($this->openedNodes) ){
906
+			return $this;
907
+		}
906 908
 
907 909
 		while( $level-->=0 ){
908 910
 			$node= array_pop($this->openedNodes);
@@ -990,7 +992,7 @@  discard block
 block discarded – undo
990 992
 	{
991 993
 		if( $this->currentSection ){
992 994
 			$this->currentSection->append($content);
993
-		}else{
995
+		} else{
994 996
 			$this->content.=$content;
995 997
 		}
996 998
 
Please login to merge, or discard this patch.
libs/Parser/Node/NamelessSectionNode.php 1 patch
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -3,8 +3,6 @@
 block discarded – undo
3 3
 namespace Htsl\Parser\Node;
4 4
 
5 5
 use Htsl\Htsl;
6
-use Htsl\ReadingBuffer\Line;
7
-use Htsl\Parser\Section;
8 6
 
9 7
 ////////////////////////////////////////////////////////////////
10 8
 
Please login to merge, or discard this patch.