Completed
Push — master ( 988761...5d514e )
by Fenz
02:27
created
libs/Embedment/CodeEmbedment.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
 	 *
15 15
 	 * @param  \Htsl\ReadingBuffer\Line $line
16 16
 	 *
17
-	 * @return \Htsl\Embedment\Contracts
17
+	 * @return CodeEmbedment
18 18
 	 */
19 19
 	public function parseLine( Line$line ):parent
20 20
 	{
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -18,13 +18,13 @@
 block discarded – undo
18 18
 	 */
19 19
 	public function parseLine( Line$line ):parent
20 20
 	{
21
-		$content= '<code>'.htmlentities($line->fullContent).'</code>';
21
+		$content='<code>'.htmlentities($line->fullContent).'</code>';
22 22
 
23
-		$indentation= $this->document->indentation;
23
+		$indentation=$this->document->indentation;
24 24
 
25
-		false!==$indentation and $content= str_repeat($indentation,$this->document->indentLevel).$content."\n";
25
+		false!==$indentation and $content=str_repeat($indentation, $this->document->indentLevel).$content."\n";
26 26
 
27
-		$this->content.= $content;
27
+		$this->content.=$content;
28 28
 
29 29
 		return $this;
30 30
 	}
Please login to merge, or discard this patch.
libs/Embedment/CssEmbedment.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
 	 *
15 15
 	 * @param  \Htsl\ReadingBuffer\Line $line
16 16
 	 *
17
-	 * @return \Htsl\Embedment\Contracts
17
+	 * @return CssEmbedment
18 18
 	 */
19 19
 	public function parseLine( Line$line ):parent
20 20
 	{
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
 	 */
19 19
 	public function parseLine( Line$line ):parent
20 20
 	{
21
-		$this->content.= $line->content;
21
+		$this->content.=$line->content;
22 22
 		return $this;
23 23
 	}
24 24
 }
Please login to merge, or discard this patch.
libs/Embedment/JsEmbedment.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
 	 *
23 23
 	 * @param  \Htsl\ReadingBuffer\Line $line
24 24
 	 *
25
-	 * @return \Htsl\Embedment\Contracts
25
+	 * @return JsEmbedment
26 26
 	 */
27 27
 	public function parseLine( Line$line ):parent
28 28
 	{
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
 	 */
19 19
 	public function parseLine( Line$line ):parent
20 20
 	{
21
-		$this->content.= $line->fullContent."\n";
21
+		$this->content.=$line->fullContent."\n";
22 22
 		return $this;
23 23
 	}
24 24
 }
Please login to merge, or discard this patch.
libs/Embedment/PhpEmbedment.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
 	 *
15 15
 	 * @param  \Htsl\ReadingBuffer\Line $line
16 16
 	 *
17
-	 * @return \Htsl\Embedment\Contracts
17
+	 * @return PhpEmbedment
18 18
 	 */
19 19
 	public function parseLine( Line$line ):parent
20 20
 	{
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
 	 */
19 19
 	public function parseLine( Line$line ):parent
20 20
 	{
21
-		$this->content.= $line->content;
21
+		$this->content.=$line->content;
22 22
 		return $this;
23 23
 	}
24 24
 }
Please login to merge, or discard this patch.
libs/Embedment/TextEmbedment.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
 	 *
15 15
 	 * @param  \Htsl\ReadingBuffer\Line $line
16 16
 	 *
17
-	 * @return \Htsl\Embedment\Contracts
17
+	 * @return TextEmbedment
18 18
 	 */
19 19
 	public function parseLine( Line$line ):parent
20 20
 	{
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
 	 */
19 19
 	public function parseLine( Line$line ):parent
20 20
 	{
21
-		$this->content.= $line->fullContent."\n";
21
+		$this->content.=$line->fullContent."\n";
22 22
 		return $this;
23 23
 	}
24 24
 }
Please login to merge, or discard this patch.
libs/Helper/TGetter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
 	 */
16 16
 	public function __get( $attribute )
17 17
 	{
18
-		if( is_callable([static::class, $getter= 'get'.implode('',array_map('ucfirst',explode('_',$attribute))),]) ){
18
+		if( is_callable([ static::class, $getter='get'.implode('', array_map('ucfirst', explode('_', $attribute))), ]) ){
19 19
 			return static::$getter();
20 20
 		}else{
21 21
 			throw new \Exception(static::class.' has no attribute named '.$attribute);
Please login to merge, or discard this patch.
libs/Helper/TSetter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
 	 */
15 15
 	public function __set( $attribute, $value )
16 16
 	{
17
-		if( is_callable([static::class, $setter= 'set'.implode('',array_map('ucfirst',explode('_',$attribute))),]) ){
17
+		if( is_callable([ static::class, $setter='set'.implode('', array_map('ucfirst', explode('_', $attribute))), ]) ){
18 18
 			return static::$setter($value);
19 19
 		}else{
20 20
 			throw new \Exception(static::class.' has no attribute named '.$attribute);
Please login to merge, or discard this patch.
libs/Parser/Section.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
 	 */
32 32
 	public function __construct( string$name=null )
33 33
 	{
34
-		$this->name = $name;
34
+		$this->name=$name;
35 35
 	}
36 36
 
37 37
 	/**
Please login to merge, or discard this patch.
libs/Parser/Node/Contracts/ANode.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -51,9 +51,9 @@  discard block
 block discarded – undo
51 51
 	 */
52 52
 	final public function __construct( Document$document, Line$line )
53 53
 	{
54
-		$this->htsl= $document->htsl;
55
-		$this->document= $document;
56
-		$this->line= $line;
54
+		$this->htsl=$document->htsl;
55
+		$this->document=$document;
56
+		$this->line=$line;
57 57
 
58 58
 		$this->construct();
59 59
 	}
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 	public function getNodeType()
100 100
 	{
101 101
 		static $nodeType;
102
-		return $nodeType??$nodeType= $this->nodeType??(static function($className){return strtolower(preg_replace('/(?<=\\w)([A-Z])/','_$1',preg_replace('/^(?:\\w+\\\\)*(\\w+)Node$/','$1',$className)));})(get_class($this));
102
+		return $nodeType??$nodeType=$this->nodeType??(static function( $className ){return strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_$1', preg_replace('/^(?:\\w+\\\\)*(\\w+)Node$/', '$1', $className))); })(get_class($this));
103 103
 	}
104 104
 
105 105
 	/**
@@ -112,39 +112,39 @@  discard block
 block discarded – undo
112 112
 	 */
113 113
 	protected function loadConfig( string$name, IConfigProvider$configProvider )
114 114
 	{
115
-		$config= $configProvider->getConfig($this->nodeType.'_nodes',$name) ?: $configProvider->getConfig($this->nodeType.'_nodes','*');
115
+		$config=$configProvider->getConfig($this->nodeType.'_nodes', $name)?: $configProvider->getConfig($this->nodeType.'_nodes', '*');
116 116
 
117
-		if( isset($config['multiple']) ){
118
-			foreach( $config['multiple'] as $value ){
119
-				if( $this->line->pregGet($value['pattern']) ){
120
-					$config= $value;
117
+		if( isset($config[ 'multiple' ]) ){
118
+			foreach( $config[ 'multiple' ] as $value ){
119
+				if( $this->line->pregGet($value[ 'pattern' ]) ){
120
+					$config=$value;
121 121
 					break;
122 122
 				}
123 123
 			}
124 124
 		}
125 125
 
126
-		if( isset($config['in']) ){
126
+		if( isset($config[ 'in' ]) ){
127 127
 			$config=(function( array$config )use($name){
128
-				foreach( $config['in'] as $key=>$value ){
128
+				foreach( $config[ 'in' ] as $key=>$value ){
129 129
 					if( $this->document->scope && $this->document->scope->scope===$key ){
130
-						$value['in_scope']= $key;
130
+						$value[ 'in_scope' ]=$key;
131 131
 						return $value;
132 132
 					}
133 133
 				}
134
-				if( !isset($config['out']) ){
135
-					$this->document->throw("The $this->nodeType node $name only use in scope ".implode(',',array_keys($config['in'])));
134
+				if( !isset($config[ 'out' ]) ){
135
+					$this->document->throw("The $this->nodeType node $name only use in scope ".implode(',', array_keys($config[ 'in' ])));
136 136
 				}
137
-				return $config['out'];
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'])) ){
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'])) ){
142
-			$this->document->throw("The $this->nodeType node $name not use in scope ".implode(',',$config['not_in']));
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' ]));
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' ]));
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
-		$this->config= $config;
147
+		$this->config=$config;
148 148
 
149 149
 		return $this;
150 150
 	}
Please login to merge, or discard this patch.