Completed
Push — master ( 92bccd...8fac4c )
by Fenz
02:24
created
libs/Embedment/PhpEmbedment.php 1 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 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
 	 */
27 27
 	public function parseLine( Line$line ):parent
28 28
 	{
29
-		$this->content.= $line->fullContent."\n";
29
+		$this->content.=$line->fullContent."\n";
30 30
 		return $this;
31 31
 	}
32 32
 }
Please login to merge, or discard this patch.
libs/Embedment/CodeEmbedment.php 1 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/Htsl.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -34,9 +34,9 @@  discard block
 block discarded – undo
34 34
 	 *
35 35
 	 * @param array $config
36 36
 	 */
37
-	public function __construct( array$config=[] )
37
+	public function __construct( array$config=[ ] )
38 38
 	{
39
-		$this->config= array_replace_recursive($this->getDefaultConfigs(),$config);
39
+		$this->config=array_replace_recursive($this->getDefaultConfigs(), $config);
40 40
 	}
41 41
 
42 42
 	/**
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 	 */
49 49
 	public function parse( string$content ):string
50 50
 	{
51
-		return $this->execute(new StringBuffer($this,$content));
51
+		return $this->execute(new StringBuffer($this, $content));
52 52
 	}
53 53
 
54 54
 	/**
@@ -61,12 +61,12 @@  discard block
 block discarded – undo
61 61
 	 */
62 62
 	public function compile( string$fromFile, string$toFile=null )
63 63
 	{
64
-		$fromFile= $this->getFilePath($fromFile);
64
+		$fromFile=$this->getFilePath($fromFile);
65 65
 
66
-		$result= $this->execute(new FileBuffer($this,$fromFile));
66
+		$result=$this->execute(new FileBuffer($this, $fromFile));
67 67
 
68 68
 		if( $toFile ){
69
-			return file_put_contents($toFile,$result);
69
+			return file_put_contents($toFile, $result);
70 70
 		}else{
71 71
 			return $result;
72 72
 		}
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 	 */
94 94
 	public function setBasePath( string$basePath ):self
95 95
 	{
96
-		$this->basePath= '/'===substr($basePath,-1) ? substr($basePath,0,-1) : $basePath;
96
+		$this->basePath='/'===substr($basePath, -1)? substr($basePath, 0, -1) : $basePath;
97 97
 
98 98
 		return $this;
99 99
 	}
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 	 */
118 118
 	protected function execute( ABuffer$buffer ):string
119 119
 	{
120
-		return (new Document($this,$buffer))->content;
120
+		return (new Document($this, $buffer))->content;
121 121
 	}
122 122
 
123 123
 	/**
@@ -129,13 +129,13 @@  discard block
 block discarded – undo
129 129
 	 */
130 130
 	public function getConfig( string...$keys )
131 131
 	{
132
-		$result= $this->config;
132
+		$result=$this->config;
133 133
 
134 134
 		foreach( $keys as $key ){
135
-			if( !isset($result[$key]) )
135
+			if( !isset($result[ $key ]) )
136 136
 				{ return null; }
137 137
 
138
-			$result= $result[$key];
138
+			$result=$result[ $key ];
139 139
 		}
140 140
 
141 141
 		return $result;
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
 		}else{
166 166
 			if( !strlen($path) )
167 167
 				{ return $this->basePath.'/'.$filePath; }
168
-			elseif( '/'===substr($path,-1) )
168
+			elseif( '/'===substr($path, -1) )
169 169
 				{ return $path.$filePath; }
170 170
 			else
171 171
 				{ return $path.'/'.$filePath; }
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
 	 */
182 182
 	public function getFileContent( string$filePath ):string
183 183
 	{
184
-		return isset($this->fileGetter) ? $this->fileGetter($filePath) : file_get_contents($filePath);
184
+		return isset($this->fileGetter)? $this->fileGetter($filePath) : file_get_contents($filePath);
185 185
 	}
186 186
 
187 187
 	/**
Please login to merge, or discard this patch.
libs/Parser/Node/TagNode.php 1 patch
Spacing   +67 added lines, -67 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
 	 *
31 31
 	 * @var array
32 32
 	 */
33
-	private $attributes=[];
33
+	private $attributes=[ ];
34 34
 
35 35
 	/**
36 36
 	 * Real constructor.
@@ -40,14 +40,14 @@  discard block
 block discarded – undo
40 40
 	protected function construct():parent
41 41
 	{
42 42
 
43
-		$name= $this->line->pregGet('/(?<=^-)[\w-:]+/');
43
+		$name=$this->line->pregGet('/(?<=^-)[\w-:]+/');
44 44
 		$this->name=$name;
45 45
 
46
-		$this->loadConfig($name,$this->document);
46
+		$this->loadConfig($name, $this->document);
47 47
 
48
-		$this->tagName=$this->config['name']??$name;
49
-		$this->isEmpty= $this->line->getChar(-1)==='/' || $this->document->getConfig('empty_tags',$this->tagName);
50
-		isset($this->config['default_attributes']) and array_walk($this->config['default_attributes'],function( $value,$key ){ $this->setAttribute($key,$value); });
48
+		$this->tagName=$this->config[ 'name' ]??$name;
49
+		$this->isEmpty=$this->line->getChar(-1)==='/' || $this->document->getConfig('empty_tags', $this->tagName);
50
+		isset($this->config[ 'default_attributes' ]) and array_walk($this->config[ 'default_attributes' ], function( $value, $key ){ $this->setAttribute($key, $value); });
51 51
 
52 52
 		return $this;
53 53
 	}
@@ -59,30 +59,30 @@  discard block
 block discarded – undo
59 59
 	 */
60 60
 	public function open():string
61 61
 	{
62
-		if( isset($this->config['opener']) )
63
-			{ return $this->config['opener']; }
62
+		if( isset($this->config[ 'opener' ]) )
63
+			{ return $this->config[ 'opener' ]; }
64 64
 
65
-		if( isset($this->config['params']) )
65
+		if( isset($this->config[ 'params' ]) )
66 66
 			{ $this->parseParams(); }
67 67
 
68
-		if( isset($this->config['name_value']) )
68
+		if( isset($this->config[ 'name_value' ]) )
69 69
 			{ $this->parseNameValue(); }
70 70
 
71
-		if( isset($this->config['link']) )
71
+		if( isset($this->config[ 'link' ]) )
72 72
 			{ $this->parseLink(); }
73 73
 
74
-		if( isset($this->config['target']) )
74
+		if( isset($this->config[ 'target' ]) )
75 75
 			{ $this->parseTarget(); }
76 76
 
77
-		if( isset($this->config['alt']) )
77
+		if( isset($this->config[ 'alt' ]) )
78 78
 			{ $this->parseAlt(); }
79 79
 
80 80
 		$this->parseCommonAttributes();
81 81
 
82
-		if( isset($this->config['in_scope']) && isset($this->config['scope_function']) && is_callable($this->config['scope_function']) )
83
-			{ $this->config['scope_function']->call($this,$this->document->scope); }
82
+		if( isset($this->config[ 'in_scope' ]) && isset($this->config[ 'scope_function' ]) && is_callable($this->config[ 'scope_function' ]) )
83
+			{ $this->config[ 'scope_function' ]->call($this, $this->document->scope); }
84 84
 
85
-		$finisher= $this->isEmpty ? ' />' : '>';
85
+		$finisher=$this->isEmpty? ' />' : '>';
86 86
 
87 87
 		return "<{$this->tagName}{$this->attributesString}{$finisher}";
88 88
 	}
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
 	 */
97 97
 	public function close( Line$Line ):string
98 98
 	{
99
-		return $this->isEmpty ? '' : $this->config['closer']??"</{$this->tagName}>";
99
+		return $this->isEmpty? '' : $this->config[ 'closer' ]??"</{$this->tagName}>";
100 100
 	}
101 101
 
102 102
 	/**
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
 	 */
107 107
 	public function getEmbed():string
108 108
 	{
109
-		return $this->config['embedding']??'';
109
+		return $this->config[ 'embedding' ]??'';
110 110
 	}
111 111
 
112 112
 	/**
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
 	 */
117 117
 	public function getScope()
118 118
 	{
119
-		return $this->config['scope']??null;
119
+		return $this->config[ 'scope' ]??null;
120 120
 	}
121 121
 
122 122
 	/**
@@ -126,11 +126,11 @@  discard block
 block discarded – undo
126 126
 	 */
127 127
 	protected function parseParams():self
128 128
 	{
129
-		$params= preg_split('/(?<!\\\\)\\|/',$this->line->pregGet('/^-[\w-:]+\((.*?)\)(?= |(\\{>)?$)/',1));
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
-		array_map(function( $key, $value ){return $this->setAttribute($key,str_replace('\\|','|',$value));},$this->config['params'],$params);
133
+		array_map(function( $key, $value ){return $this->setAttribute($key, str_replace('\\|', '|', $value)); },$this->config[ 'params' ], $params);
134 134
 
135 135
 		return $this;
136 136
 	}
@@ -142,9 +142,9 @@  discard block
 block discarded – undo
142 142
 	 */
143 143
 	protected function parseNameValue():self
144 144
 	{
145
-		$params= $this->line->pregGet('/ <(.*?)>(?= |$)/',1)
146
-		 and $params= preg_split('/(?<!\\\\)\\|/',$params)
147
-		  and array_map(function( $key, $value ){return isset($key)&&isset($value) ? $this->setAttribute($key,$this->checkExpression(str_replace('\\|','|',$value))) : '';},$this->config['name_value'],$params);
145
+		$params=$this->line->pregGet('/ <(.*?)>(?= |$)/', 1)
146
+		 and $params=preg_split('/(?<!\\\\)\\|/', $params)
147
+		  and array_map(function( $key, $value ){return isset($key) && isset($value)? $this->setAttribute($key, $this->checkExpression(str_replace('\\|', '|', $value))) : ''; },$this->config[ 'name_value' ], $params);
148 148
 
149 149
 		return $this;
150 150
 	}
@@ -156,17 +156,17 @@  discard block
 block discarded – undo
156 156
 	 */
157 157
 	protected function parseLink():self
158 158
 	{
159
-		$link= $this->line->pregGet('/ @((?!\()(?:[^ ]| (?=[a-zA-Z0-9]))+|(?<exp>\((?:[^()]+|(?&exp)?)+?\)))(?= |$)/',1);
159
+		$link=$this->line->pregGet('/ @((?!\()(?:[^ ]| (?=[a-zA-Z0-9]))+|(?<exp>\((?:[^()]+|(?&exp)?)+?\)))(?= |$)/', 1);
160 160
 
161 161
 		if( strlen($link) ){
162
-			if( isset($this->config['target']) && ':'===$link{0} ){
163
-				$this->setAttribute($this->config['link'],'javascript'.$link);
164
-			}elseif( '//'===($firstTwoLetters=substr($link,0,2)) ){
165
-				$this->setAttribute($this->config['link'],'http:'.$link);
162
+			if( isset($this->config[ 'target' ]) && ':'===$link{0} ){
163
+				$this->setAttribute($this->config[ 'link' ], 'javascript'.$link);
164
+			}elseif( '//'===($firstTwoLetters=substr($link, 0, 2)) ){
165
+				$this->setAttribute($this->config[ 'link' ], 'http:'.$link);
166 166
 			}elseif( '\\\\'===$firstTwoLetters ){
167
-				$this->setAttribute($this->config['link'],'https://'.substr($link,2));
167
+				$this->setAttribute($this->config[ 'link' ], 'https://'.substr($link, 2));
168 168
 			}else{
169
-				$this->setAttribute($this->config['link'],$this->checkExpression($link));
169
+				$this->setAttribute($this->config[ 'link' ], $this->checkExpression($link));
170 170
 			}
171 171
 		}
172 172
 
@@ -180,10 +180,10 @@  discard block
 block discarded – undo
180 180
 	 */
181 181
 	protected function parseTarget():self
182 182
 	{
183
-		$target= $this->line->pregGet('/ >((?!\()(?:[^ ]| (?=[a-zA-Z0-9]))+|(?<exp>\((?:[^()]+|(?&exp)?)+?\)))(?= |$)/',1);
183
+		$target=$this->line->pregGet('/ >((?!\()(?:[^ ]| (?=[a-zA-Z0-9]))+|(?<exp>\((?:[^()]+|(?&exp)?)+?\)))(?= |$)/', 1);
184 184
 
185 185
 		if( strlen($target) ){
186
-			$this->setAttribute($this->config['target'],$this->checkExpression($target));
186
+			$this->setAttribute($this->config[ 'target' ], $this->checkExpression($target));
187 187
 		}
188 188
 
189 189
 		return $this;
@@ -196,10 +196,10 @@  discard block
 block discarded – undo
196 196
 	 */
197 197
 	protected function parseAlt():self
198 198
 	{
199
-		$alt= $this->line->pregGet('/ _((?!\()(?:[^ ]| (?=[a-zA-Z0-9]))+|(?<exp>\((?:[^()]+|(?&exp)?)+?\)))(?= |$)/',1);
199
+		$alt=$this->line->pregGet('/ _((?!\()(?:[^ ]| (?=[a-zA-Z0-9]))+|(?<exp>\((?:[^()]+|(?&exp)?)+?\)))(?= |$)/', 1);
200 200
 
201 201
 		if( strlen($alt) ){
202
-			$this->setAttribute($this->config['alt'],$this->checkExpression($alt));
202
+			$this->setAttribute($this->config[ 'alt' ], $this->checkExpression($alt));
203 203
 		}
204 204
 
205 205
 		return $this;
@@ -212,33 +212,33 @@  discard block
 block discarded – undo
212 212
 	 */
213 213
 	protected function parseCommonAttributes():string
214 214
 	{
215
-		$attributes= '';
215
+		$attributes='';
216 216
 
217
-		$id= $this->line->pregGet('/ #([^ ]+|(?<exp>\((?:[^()]+|(?&exp)?)+?\)))(?= |$)/',1)
218
-		 and $this->setAttribute('id',$id);
217
+		$id=$this->line->pregGet('/ #([^ ]+|(?<exp>\((?:[^()]+|(?&exp)?)+?\)))(?= |$)/', 1)
218
+		 and $this->setAttribute('id', $id);
219 219
 
220
-		$classes= $this->line->pregGet('/ \.[^ ]+(?= |$)/')
221
-		 and preg_match_all('/\.((?(?!\()[^.]+|(?<exp>\((?:[^()]+|(?&exp)?)+?\))))/',$classes,$matches)
222
-		  and $classes= implode(' ',array_filter(array_map(function( $className ){return $this->checkExpression($className);},$matches[1])))
223
-		   and $this->setAttribute('class',$classes);
220
+		$classes=$this->line->pregGet('/ \.[^ ]+(?= |$)/')
221
+		 and preg_match_all('/\.((?(?!\()[^.]+|(?<exp>\((?:[^()]+|(?&exp)?)+?\))))/', $classes, $matches)
222
+		  and $classes=implode(' ', array_filter(array_map(function( $className ){return $this->checkExpression($className); },$matches[ 1 ])))
223
+		   and $this->setAttribute('class', $classes);
224 224
 
225
-		$title= $this->line->pregGet('/ \^((?!\()(?:[^ ]| (?=[a-zA-Z0-9]))+|(?<exp>\((?:[^()]+|(?&exp)?)+?\)))(?= |$)/',1)
226
-		 and $this->setAttribute('title',$title);
225
+		$title=$this->line->pregGet('/ \^((?!\()(?:[^ ]| (?=[a-zA-Z0-9]))+|(?<exp>\((?:[^()]+|(?&exp)?)+?\)))(?= |$)/', 1)
226
+		 and $this->setAttribute('title', $title);
227 227
 
228
-		$style= $this->line->pregGet('/ \[([^\]]+;)(?=\]( |$))/',1)
229
-		 and $this->setAttribute('style',$style);
228
+		$style=$this->line->pregGet('/ \[([^\]]+;)(?=\]( |$))/', 1)
229
+		 and $this->setAttribute('style', $style);
230 230
 
231
-		$eventListeners= $this->line->pregMap('/ %(\w+)\{>(.*?)<\}(?= |$)/',function( $string, $name, $code ){
232
-			$this->setAttribute('on'.$name,str_replace('"','&quot;',$code));
231
+		$eventListeners=$this->line->pregMap('/ %(\w+)\{>(.*?)<\}(?= |$)/', function( $string, $name, $code ){
232
+			$this->setAttribute('on'.$name, str_replace('"', '&quot;', $code));
233 233
 		})
234
-		 and implode('',$eventListeners);
234
+		 and implode('', $eventListeners);
235 235
 
236
-		$other= $this->line->pregGet('/(?<=\{).*?(?=;\}( |$))/')
236
+		$other=$this->line->pregGet('/(?<=\{).*?(?=;\}( |$))/')
237 237
 		 and array_map(function( $keyValue ){
238
-			preg_replace_callback('/^([\w-:]+)(?:\?(.+?))?(?:\=(.*))?$/',function($matches){
239
-				$this->setAttribute($matches[1],($matches[3]??$matches[1])?:$matches[1],$matches[2]??null);
238
+			preg_replace_callback('/^([\w-:]+)(?:\?(.+?))?(?:\=(.*))?$/', function( $matches ){
239
+				$this->setAttribute($matches[ 1 ], ($matches[ 3 ]??$matches[ 1 ])?: $matches[ 1 ], $matches[ 2 ]??null);
240 240
 			},$keyValue);
241
-		},explode(';',$other));
241
+		},explode(';', $other));
242 242
 
243 243
 		return $attributes;
244 244
 	}
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
 	 */
253 253
 	protected function checkExpression( string$value ):string
254 254
 	{
255
-		return preg_match('/^\(.*\)$/',$value) ? '<?='.substr($value,1,-1).'?>' : str_replace('"','&quot;',$value);
255
+		return preg_match('/^\(.*\)$/', $value)? '<?='.substr($value, 1, -1).'?>' : str_replace('"', '&quot;', $value);
256 256
 	}
257 257
 
258 258
 	/**
@@ -263,13 +263,13 @@  discard block
 block discarded – undo
263 263
 	protected function getAttributesString():string
264 264
 	{
265 265
 		ksort($this->attributes);
266
-		return implode('',array_map(static function( string$key, array$data ){
267
-			return (isset($data['condition'])&&strlen($data['condition'])?
268
-				"<?php if( {$data['condition']} ){?> $key=\"{$data['value']}\"<?php }?>"
266
+		return implode('', array_map(static function( string$key, array$data ){
267
+			return (isset($data[ 'condition' ]) && strlen($data[ 'condition' ])?
268
+				"<?php if( {$data[ 'condition' ]} ){?> $key=\"{$data[ 'value' ]}\"<?php }?>"
269 269
 				:
270
-				" $key=\"{$data['value']}\""
270
+				" $key=\"{$data[ 'value' ]}\""
271 271
 			);
272
-		},array_keys($this->attributes),$this->attributes));
272
+		},array_keys($this->attributes), $this->attributes));
273 273
 	}
274 274
 
275 275
 	/**
@@ -281,10 +281,10 @@  discard block
 block discarded – undo
281 281
 	 */
282 282
 	protected function setAttribute( string$key, string$value, string$condition=null ):self
283 283
 	{
284
-		if( isset($this->attributes[$key]) )
284
+		if( isset($this->attributes[ $key ]) )
285 285
 			{ $this->document->throw("Attribute $key of $this->name cannot redeclare."); }
286 286
 
287
-		$this->attributes[$key]=[
287
+		$this->attributes[ $key ]=[
288 288
 			'value'=> $value,
289 289
 			'condition'=> $condition,
290 290
 		];
@@ -306,7 +306,7 @@  discard block
 block discarded – undo
306 306
 	 */
307 307
 	public function offsetExists( $offset ):bool
308 308
 	{
309
-		return isset($this->attributes[$offset]);
309
+		return isset($this->attributes[ $offset ]);
310 310
 	}
311 311
 
312 312
 	/**
@@ -318,7 +318,7 @@  discard block
 block discarded – undo
318 318
 	 */
319 319
 	public function offsetGet( $offset )
320 320
 	{
321
-		return $this->attributes[$offset]??null;
321
+		return $this->attributes[ $offset ]??null;
322 322
 	}
323 323
 
324 324
 	/**
@@ -329,7 +329,7 @@  discard block
 block discarded – undo
329 329
 	 */
330 330
 	public function offsetSet( $offset, $value )
331 331
 	{
332
-		$this->setAttribute($offset,$value);
332
+		$this->setAttribute($offset, $value);
333 333
 	}
334 334
 
335 335
 	/**
@@ -339,7 +339,7 @@  discard block
 block discarded – undo
339 339
 	 */
340 340
 	public function offsetUnset( $offset )
341 341
 	{
342
-		if( isset($this->attributes[$offset]) )
343
-			{ unset($this->attributes[$offset]); }
342
+		if( isset($this->attributes[ $offset ]) )
343
+			{ unset($this->attributes[ $offset ]); }
344 344
 	}
345 345
 }
Please login to merge, or discard this patch.
libs/Embedment/CssEmbedment.php 1 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 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
 	 */
27 27
 	public function parseLine( Line$line ):parent
28 28
 	{
29
-		$this->content.= $line->fullContent."\n";
29
+		$this->content.=$line->fullContent."\n";
30 30
 		return $this;
31 31
 	}
32 32
 }
Please login to merge, or discard this patch.
libs/Helper/DefaultConfigs.php 1 patch
Spacing   +75 added lines, -75 removed lines patch added patch discarded remove patch
@@ -170,66 +170,66 @@  discard block
 block discarded – undo
170 170
 				],
171 171
 			],
172 172
 			'tag_nodes'=> [
173
-				'SVG1.1'=> $svgTags= [
173
+				'SVG1.1'=> $svgTags=[
174 174
 					'svg'=> [
175 175
 						'out'=> [
176
-							'default_attributes'=> ['xmlns'=> 'http://www.w3.org/2000/svg','version'=> '1.1',],
177
-							'params'=> ['viewBox',],
176
+							'default_attributes'=> [ 'xmlns'=> 'http://www.w3.org/2000/svg', 'version'=> '1.1', ],
177
+							'params'=> [ 'viewBox', ],
178 178
 							'scope'=> 'svg',
179 179
 						],
180 180
 						'in'=> [
181 181
 							'svg'=> [
182
-								'params'=> ['x','y','width','height',],
182
+								'params'=> [ 'x', 'y', 'width', 'height', ],
183 183
 							],
184 184
 						],
185 185
 					],
186
-					'*'=> [],
186
+					'*'=> [ ],
187 187
 					'polygon'=> [
188
-						'params'=> ['points',],
189
-						'only_in'=> ['svg',],
188
+						'params'=> [ 'points', ],
189
+						'only_in'=> [ 'svg', ],
190 190
 					],
191 191
 					'polyline'=> [
192
-						'params'=> ['points',],
193
-						'only_in'=> ['svg',],
192
+						'params'=> [ 'points', ],
193
+						'only_in'=> [ 'svg', ],
194 194
 					],
195 195
 					'path'=> [
196
-						'params'=> ['d',],
197
-						'only_in'=> ['svg',],
196
+						'params'=> [ 'd', ],
197
+						'only_in'=> [ 'svg', ],
198 198
 					],
199 199
 					'line'=> [
200
-						'params'=> ['x1','y1','x2','y2',],
201
-						'only_in'=> ['svg',],
200
+						'params'=> [ 'x1', 'y1', 'x2', 'y2', ],
201
+						'only_in'=> [ 'svg', ],
202 202
 					],
203 203
 					'rect'=> [
204
-						'params'=> ['x','y','width','height',],
205
-						'only_in'=> ['svg',],
204
+						'params'=> [ 'x', 'y', 'width', 'height', ],
205
+						'only_in'=> [ 'svg', ],
206 206
 					],
207 207
 					'circle'=> [
208
-						'params'=> ['cx','cy','r',],
209
-						'only_in'=> ['svg',],
208
+						'params'=> [ 'cx', 'cy', 'r', ],
209
+						'only_in'=> [ 'svg', ],
210 210
 					],
211 211
 					'ellipse'=> [
212
-						'params'=> ['cx','cy','rx','ry',],
213
-						'only_in'=> ['svg',],
212
+						'params'=> [ 'cx', 'cy', 'rx', 'ry', ],
213
+						'only_in'=> [ 'svg', ],
214 214
 					],
215 215
 					'text'=> [
216
-						'params'=> ['x','y',],
217
-						'only_in'=> ['svg',],
216
+						'params'=> [ 'x', 'y', ],
217
+						'only_in'=> [ 'svg', ],
218 218
 					],
219 219
 				],
220 220
 				'HTML5'=> [
221
-					'*'=> [],
221
+					'*'=> [ ],
222 222
 					'charset'=> [
223 223
 						'name'=> 'meta',
224
-						'params'=> ['charset',],
224
+						'params'=> [ 'charset', ],
225 225
 					],
226 226
 					'equiv'=> [
227 227
 						'name'=> 'meta',
228
-						'name_value'=> ['http-equiv','content','scheme',],
228
+						'name_value'=> [ 'http-equiv', 'content', 'scheme', ],
229 229
 					],
230 230
 					'meta'=> [
231 231
 						'name'=> 'meta',
232
-						'name_value'=> ['name','content','scheme',],
232
+						'name_value'=> [ 'name', 'content', 'scheme', ],
233 233
 					],
234 234
 					'php'=> [
235 235
 						'opener'=> '<?php ',
@@ -241,14 +241,14 @@  discard block
 block discarded – undo
241 241
 						'multiple'=> [
242 242
 							[
243 243
 								'pattern'=> '/\{>$/',
244
-								'params'=> ['type',],
245
-								'default_attributes'=> ['codeset'=> 'codeset',],
244
+								'params'=> [ 'type', ],
245
+								'default_attributes'=> [ 'codeset'=> 'codeset', ],
246 246
 								'embedding'=> 'code',
247 247
 							],
248 248
 							[
249 249
 								'pattern'=> '/.?/',
250 250
 								'name'=> 'code',
251
-								'params'=> ['type',],
251
+								'params'=> [ 'type', ],
252 252
 							],
253 253
 						],
254 254
 					],
@@ -257,13 +257,13 @@  discard block
 block discarded – undo
257 257
 							[
258 258
 								'pattern'=> '/^-js @/',
259 259
 								'name'=> 'script',
260
-								'default_attributes'=> ['type'=> 'text/javascript',],
260
+								'default_attributes'=> [ 'type'=> 'text/javascript', ],
261 261
 								'link'=> 'src',
262 262
 							],
263 263
 							[
264 264
 								'pattern'=> '/^-js\{>/',
265 265
 								'name'=> 'script',
266
-								'default_attributes'=> ['type'=> 'text/javascript',],
266
+								'default_attributes'=> [ 'type'=> 'text/javascript', ],
267 267
 								'embedding'=> 'js',
268 268
 							],
269 269
 						],
@@ -273,90 +273,90 @@  discard block
 block discarded – undo
273 273
 							[
274 274
 								'pattern'=> '/^-css @/',
275 275
 								'name'=> 'link',
276
-								'default_attributes'=> ['rel'=> 'stylesheet','type'=> 'text/css',],
276
+								'default_attributes'=> [ 'rel'=> 'stylesheet', 'type'=> 'text/css', ],
277 277
 								'link'=> 'href',
278 278
 							],
279 279
 							[
280 280
 								'pattern'=> '/^-css\{>/',
281 281
 								'name'=> 'style',
282
-								'default_attributes'=> ['type'=> 'text/css',],
282
+								'default_attributes'=> [ 'type'=> 'text/css', ],
283 283
 								'embedding'=> 'css',
284 284
 							],
285 285
 						],
286 286
 					],
287 287
 					'icon'=> [
288 288
 						'name'=> 'link',
289
-						'default_attributes'=> ['rel'=> 'icon',],
290
-						'params'=> ['sizes',],
289
+						'default_attributes'=> [ 'rel'=> 'icon', ],
290
+						'params'=> [ 'sizes', ],
291 291
 						'link'=> 'href',
292 292
 					],
293 293
 					'shortcut'=> [
294 294
 						'name'=> 'link',
295
-						'default_attributes'=> ['rel'=> 'shortcut icon','type'=> 'image/x-icon',],
295
+						'default_attributes'=> [ 'rel'=> 'shortcut icon', 'type'=> 'image/x-icon', ],
296 296
 						'link'=> 'href',
297 297
 					],
298 298
 					'link'=> [
299 299
 						'name'=> 'link',
300
-						'params'=> ['rel',],
300
+						'params'=> [ 'rel', ],
301 301
 						'link'=> 'href',
302 302
 					],
303 303
 					'a'=> [
304 304
 						'link'=> 'href',
305
-						'name_value'=> ['name',],
305
+						'name_value'=> [ 'name', ],
306 306
 						'target'=> 'target',
307 307
 					],
308 308
 					'iframe'=> [
309 309
 						'link'=> 'src',
310
-						'default_attributes'=> ['frameborder'=> '0',],
311
-						'name_value'=> ['name',],
310
+						'default_attributes'=> [ 'frameborder'=> '0', ],
311
+						'name_value'=> [ 'name', ],
312 312
 					],
313 313
 					'img'=> [
314 314
 						'link'=> 'src',
315 315
 						'alt'=> 'alt',
316 316
 					],
317
-					'form'=>   ['name'=> 'form', 'link'=> 'action', 'target'=> 'target', 'name_value'=> ['name',], 'default_attributes'=> ['method'=> 'post',],],
318
-					'post'=>   ['name'=> 'form', 'link'=> 'action', 'target'=> 'target', 'name_value'=> ['name',], 'default_attributes'=> ['method'=> 'post',],],
319
-					'upload'=> ['name'=> 'form', 'link'=> 'action', 'target'=> 'target', 'name_value'=> ['name',], 'default_attributes'=> ['method'=> 'post','enctype'=> 'multipart/form-data',],],
320
-					'get'=>    ['name'=> 'form', 'link'=> 'action', 'target'=> 'target', 'name_value'=> ['name',], 'default_attributes'=> ['method'=> 'get',],],
317
+					'form'=>   [ 'name'=> 'form', 'link'=> 'action', 'target'=> 'target', 'name_value'=> [ 'name', ], 'default_attributes'=> [ 'method'=> 'post', ], ],
318
+					'post'=>   [ 'name'=> 'form', 'link'=> 'action', 'target'=> 'target', 'name_value'=> [ 'name', ], 'default_attributes'=> [ 'method'=> 'post', ], ],
319
+					'upload'=> [ 'name'=> 'form', 'link'=> 'action', 'target'=> 'target', 'name_value'=> [ 'name', ], 'default_attributes'=> [ 'method'=> 'post', 'enctype'=> 'multipart/form-data', ], ],
320
+					'get'=>    [ 'name'=> 'form', 'link'=> 'action', 'target'=> 'target', 'name_value'=> [ 'name', ], 'default_attributes'=> [ 'method'=> 'get', ], ],
321 321
 
322
-					'input'=>          ['name'=> 'input',  'default_attributes'=> ['type'=> 'hidden',],         'name_value'=> ['name', 'value', 'form',],],
323
-					'text'=>  ['out'=> ['name'=> 'input',  'default_attributes'=> ['type'=> 'text',],           'name_value'=> ['name', 'value', 'form',], 'alt'=> 'placeholder',], 'in'=> ['svg'=> ['params'=> ['x','y',],],],],
324
-					'search'=>         ['name'=> 'input',  'default_attributes'=> ['type'=> 'search',],         'name_value'=> ['name', 'value', 'form',], 'alt'=> 'placeholder',],
325
-					'password'=>       ['name'=> 'input',  'default_attributes'=> ['type'=> 'password',],       'name_value'=> ['name', 'value', 'form',], 'alt'=> 'placeholder',],
326
-					'email'=>          ['name'=> 'input',  'default_attributes'=> ['type'=> 'email',],          'name_value'=> ['name', 'value', 'form',], 'alt'=> 'placeholder',],
327
-					'url'=>            ['name'=> 'input',  'default_attributes'=> ['type'=> 'url',],            'name_value'=> ['name', 'value', 'form',], 'alt'=> 'placeholder',],
328
-					'tel'=>            ['name'=> 'input',  'default_attributes'=> ['type'=> 'tel',],            'name_value'=> ['name', 'value', 'form',], 'alt'=> 'placeholder',],
329
-					'number'=>         ['name'=> 'input',  'default_attributes'=> ['type'=> 'number',],         'name_value'=> ['name', 'value', 'form',], 'alt'=> 'placeholder', 'params'=> ['min', 'step', 'max',],],
330
-					'range'=>          ['name'=> 'input',  'default_attributes'=> ['type'=> 'range',],          'name_value'=> ['name', 'value', 'form',],                'params'=> ['min', 'step', 'max',],],
331
-					'radio'=>          ['name'=> 'input',  'default_attributes'=> ['type'=> 'radio',],          'name_value'=> ['name', 'value', 'form',],],
332
-					'checkbox'=>       ['name'=> 'input',  'default_attributes'=> ['type'=> 'checkbox',],       'name_value'=> ['name', 'value', 'form',],],
333
-					'date'=>           ['name'=> 'input',  'default_attributes'=> ['type'=> 'date',],           'name_value'=> ['name', 'value', 'form',],],
334
-					'month'=>          ['name'=> 'input',  'default_attributes'=> ['type'=> 'month',],          'name_value'=> ['name', 'value', 'form',],],
335
-					'week'=>           ['name'=> 'input',  'default_attributes'=> ['type'=> 'week',],           'name_value'=> ['name', 'value', 'form',],],
336
-					'time'=>           ['name'=> 'input',  'default_attributes'=> ['type'=> 'time',],           'name_value'=> ['name', 'value', 'form',],],
337
-					'datetime'=>       ['name'=> 'input',  'default_attributes'=> ['type'=> 'datetime',],       'name_value'=> ['name', 'value', 'form',],],
338
-					'datetime-local'=> ['name'=> 'input',  'default_attributes'=> ['type'=> 'datetime-local',], 'name_value'=> ['name', 'value', 'form',],],
339
-					'color'=>          ['name'=> 'input',  'default_attributes'=> ['type'=> 'color',],          'name_value'=> ['name', 'value', 'form',],],
340
-					'file'=>           ['name'=> 'input',  'default_attributes'=> ['type'=> 'file',],           'name_value'=> ['name', 'form',], 'params'=> ['accept',],],
322
+					'input'=>          [ 'name'=> 'input', 'default_attributes'=> [ 'type'=> 'hidden', ], 'name_value'=> [ 'name', 'value', 'form', ], ],
323
+					'text'=>  [ 'out'=> [ 'name'=> 'input', 'default_attributes'=> [ 'type'=> 'text', ], 'name_value'=> [ 'name', 'value', 'form', ], 'alt'=> 'placeholder', ], 'in'=> [ 'svg'=> [ 'params'=> [ 'x', 'y', ], ], ], ],
324
+					'search'=>         [ 'name'=> 'input', 'default_attributes'=> [ 'type'=> 'search', ], 'name_value'=> [ 'name', 'value', 'form', ], 'alt'=> 'placeholder', ],
325
+					'password'=>       [ 'name'=> 'input', 'default_attributes'=> [ 'type'=> 'password', ], 'name_value'=> [ 'name', 'value', 'form', ], 'alt'=> 'placeholder', ],
326
+					'email'=>          [ 'name'=> 'input', 'default_attributes'=> [ 'type'=> 'email', ], 'name_value'=> [ 'name', 'value', 'form', ], 'alt'=> 'placeholder', ],
327
+					'url'=>            [ 'name'=> 'input', 'default_attributes'=> [ 'type'=> 'url', ], 'name_value'=> [ 'name', 'value', 'form', ], 'alt'=> 'placeholder', ],
328
+					'tel'=>            [ 'name'=> 'input', 'default_attributes'=> [ 'type'=> 'tel', ], 'name_value'=> [ 'name', 'value', 'form', ], 'alt'=> 'placeholder', ],
329
+					'number'=>         [ 'name'=> 'input', 'default_attributes'=> [ 'type'=> 'number', ], 'name_value'=> [ 'name', 'value', 'form', ], 'alt'=> 'placeholder', 'params'=> [ 'min', 'step', 'max', ], ],
330
+					'range'=>          [ 'name'=> 'input', 'default_attributes'=> [ 'type'=> 'range', ], 'name_value'=> [ 'name', 'value', 'form', ], 'params'=> [ 'min', 'step', 'max', ], ],
331
+					'radio'=>          [ 'name'=> 'input', 'default_attributes'=> [ 'type'=> 'radio', ], 'name_value'=> [ 'name', 'value', 'form', ], ],
332
+					'checkbox'=>       [ 'name'=> 'input', 'default_attributes'=> [ 'type'=> 'checkbox', ], 'name_value'=> [ 'name', 'value', 'form', ], ],
333
+					'date'=>           [ 'name'=> 'input', 'default_attributes'=> [ 'type'=> 'date', ], 'name_value'=> [ 'name', 'value', 'form', ], ],
334
+					'month'=>          [ 'name'=> 'input', 'default_attributes'=> [ 'type'=> 'month', ], 'name_value'=> [ 'name', 'value', 'form', ], ],
335
+					'week'=>           [ 'name'=> 'input', 'default_attributes'=> [ 'type'=> 'week', ], 'name_value'=> [ 'name', 'value', 'form', ], ],
336
+					'time'=>           [ 'name'=> 'input', 'default_attributes'=> [ 'type'=> 'time', ], 'name_value'=> [ 'name', 'value', 'form', ], ],
337
+					'datetime'=>       [ 'name'=> 'input', 'default_attributes'=> [ 'type'=> 'datetime', ], 'name_value'=> [ 'name', 'value', 'form', ], ],
338
+					'datetime-local'=> [ 'name'=> 'input', 'default_attributes'=> [ 'type'=> 'datetime-local', ], 'name_value'=> [ 'name', 'value', 'form', ], ],
339
+					'color'=>          [ 'name'=> 'input', 'default_attributes'=> [ 'type'=> 'color', ], 'name_value'=> [ 'name', 'value', 'form', ], ],
340
+					'file'=>           [ 'name'=> 'input', 'default_attributes'=> [ 'type'=> 'file', ], 'name_value'=> [ 'name', 'form', ], 'params'=> [ 'accept', ], ],
341 341
 
342
-					'submit'=>         ['name'=> 'button', 'default_attributes'=> ['type'=> 'submit',],         'name_value'=> ['name', 'value','form',], 'link'=> 'formaction', 'target'=> 'formtarget',],
343
-					'reset'=>          ['name'=> 'button', 'default_attributes'=> ['type'=> 'reset',],          'name_value'=> ['form',],],
344
-					'button'=>         ['name'=> 'button', 'default_attributes'=> ['type'=> 'button',],],
342
+					'submit'=>         [ 'name'=> 'button', 'default_attributes'=> [ 'type'=> 'submit', ], 'name_value'=> [ 'name', 'value', 'form', ], 'link'=> 'formaction', 'target'=> 'formtarget', ],
343
+					'reset'=>          [ 'name'=> 'button', 'default_attributes'=> [ 'type'=> 'reset', ], 'name_value'=> [ 'form', ], ],
344
+					'button'=>         [ 'name'=> 'button', 'default_attributes'=> [ 'type'=> 'button', ], ],
345 345
 
346
-					'textarea'=>       ['name'=> 'textarea', 'name_value'=> ['name','value','form',],'alt'=> 'placeholder',],
346
+					'textarea'=>       [ 'name'=> 'textarea', 'name_value'=> [ 'name', 'value', 'form', ], 'alt'=> 'placeholder', ],
347 347
 
348 348
 					'select'=> [
349
-						'name_value'=> ['name', 'value','form',],
349
+						'name_value'=> [ 'name', 'value', 'form', ],
350 350
 						'scope'=> 'select',
351 351
 					],
352 352
 					'datalist'=> [
353
-						'params'=> ['id',],
353
+						'params'=> [ 'id', ],
354 354
 						'scope'=> 'datalist',
355 355
 					],
356 356
 					'optgroup'=> [
357 357
 						'in'=> [
358 358
 							'select'=> [
359
-								'name_value'=> ['label',],
359
+								'name_value'=> [ 'label', ],
360 360
 							],
361 361
 						],
362 362
 					],
@@ -364,23 +364,23 @@  discard block
 block discarded – undo
364 364
 						'in'=> [
365 365
 							'select'=> [
366 366
 								'scope_function'=> function( $scope ){
367
-									if( $scope['value']===$this['value'] ){
368
-										$this['selected']= 'selected';
367
+									if( $scope[ 'value' ]===$this[ 'value' ] ){
368
+										$this[ 'selected' ]='selected';
369 369
 									};
370 370
 								},
371
-								'name_value'=> ['value', 'label',],
371
+								'name_value'=> [ 'value', 'label', ],
372 372
 							],
373 373
 							'datalist'=> [
374
-								'name_value'=> ['value',],
374
+								'name_value'=> [ 'value', ],
375 375
 							],
376 376
 						],
377 377
 					],
378 378
 
379 379
 					'param'=> [
380
-						'name_value'=> ['name','value',],
380
+						'name_value'=> [ 'name', 'value', ],
381 381
 					],
382 382
 					'source'=> [
383
-						'params'=>['type',],
383
+						'params'=>[ 'type', ],
384 384
 						'link'=> 'src',
385 385
 					],
386 386
 					'base'=> [
Please login to merge, or discard this patch.
libs/ReadingBuffer/Contracts/ABuffer.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
 	 *
32 32
 	 * @var string
33 33
 	 */
34
-	protected $filePath= '';
34
+	protected $filePath='';
35 35
 
36 36
 	/**
37 37
 	 * Constructing a buffer reading HTSL content from somewhere.
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 	 */
43 43
 	public function __construct( Htsl$htsl )
44 44
 	{
45
-		$this->htsl= $htsl;
45
+		$this->htsl=$htsl;
46 46
 	}
47 47
 
48 48
 	/**
Please login to merge, or discard this patch.