@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | // Ensure there is no code on the same line as the PHP open tag and it is followed by a blank line. |
25 | 25 | 'blank_line_after_opening_tag' => true, |
26 | 26 | // An empty line feed must precede any configured statement. |
27 | - 'blank_line_before_statement' => ['statements'=>['break','case','continue','declare','default','exit','do','exit','for','foreach','goto','if','return','switch','throw','try','while','yield']], |
|
27 | + 'blank_line_before_statement' => ['statements'=>['break', 'case', 'continue', 'declare', 'default', 'exit', 'do', 'exit', 'for', 'foreach', 'goto', 'if', 'return', 'switch', 'throw', 'try', 'while', 'yield']], |
|
28 | 28 | // A single space or none should be between cast and variable. |
29 | 29 | 'cast_spaces' => ['space'=>'none'], |
30 | 30 | // Class, trait and interface elements must be separated with one or none blank line. |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | // Function defined by PHP should be called using the correct casing. |
111 | 111 | 'native_function_casing' => true, |
112 | 112 | // Add leading `\` before function invocation to speed up resolving. |
113 | - 'native_function_invocation' => ['include'=>['@all','trans']], |
|
113 | + 'native_function_invocation' => ['include'=>['@all', 'trans']], |
|
114 | 114 | // Native type hints for functions should use the correct case. |
115 | 115 | 'native_function_type_declaration_casing' => true, |
116 | 116 | // All instances created with new keyword must be followed by braces. |
@@ -192,7 +192,7 @@ discard block |
||
192 | 192 | // There should not be space before or after object operators `->` and `?->`. |
193 | 193 | 'object_operator_without_whitespace' => true, |
194 | 194 | // Orders the elements of classes/interfaces/traits. |
195 | - 'ordered_class_elements' => ['order'=>['use_trait','constant_public','constant_protected','constant_private','property_public','property_protected','property_private','construct','destruct','magic','phpunit','method_public','method_protected','method_private']], |
|
195 | + 'ordered_class_elements' => ['order'=>['use_trait', 'constant_public', 'constant_protected', 'constant_private', 'property_public', 'property_protected', 'property_private', 'construct', 'destruct', 'magic', 'phpunit', 'method_public', 'method_protected', 'method_private']], |
|
196 | 196 | // Ordering `use` statements. |
197 | 197 | 'ordered_imports' => true, |
198 | 198 | // Orders the interfaces in an `implements` or `interface extends` clause. |
@@ -309,7 +309,7 @@ discard block |
||
309 | 309 | { |
310 | 310 | $encoded = \preg_replace('/\r\n|\r|\n/', "\r\n", \rtrim(\convert_uuencode($bytes))); |
311 | 311 | // removes ending '`' line |
312 | - $this->stream->write("\r\n" . \rtrim(\substr($encoded, 0, -1))); |
|
312 | + $this->stream->write("\r\n".\rtrim(\substr($encoded, 0, -1))); |
|
313 | 313 | } |
314 | 314 | |
315 | 315 | /** |
@@ -322,7 +322,7 @@ discard block |
||
322 | 322 | */ |
323 | 323 | private function handleRemainder($string) |
324 | 324 | { |
325 | - $write = $this->remainder . $string; |
|
325 | + $write = $this->remainder.$string; |
|
326 | 326 | $nRem = \strlen($write) % 45; |
327 | 327 | $this->remainder = ''; |
328 | 328 | |
@@ -339,7 +339,7 @@ discard block |
||
339 | 339 | */ |
340 | 340 | private function beforeClose() |
341 | 341 | { |
342 | - if (! $this->isWriting) { |
|
342 | + if (!$this->isWriting) { |
|
343 | 343 | return; |
344 | 344 | } |
345 | 345 |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | public function write($string) |
120 | 120 | { |
121 | 121 | $encodedLine = \quoted_printable_encode($this->lastLine); |
122 | - $lineAndString = \rtrim(\quoted_printable_encode($this->lastLine . $string), "\r\n"); |
|
122 | + $lineAndString = \rtrim(\quoted_printable_encode($this->lastLine.$string), "\r\n"); |
|
123 | 123 | $write = \substr($lineAndString, \strlen($encodedLine)); |
124 | 124 | $this->stream->write($write); |
125 | 125 | $written = \strlen($string); |
@@ -175,13 +175,13 @@ discard block |
||
175 | 175 | */ |
176 | 176 | private function readEncodedChars($length, $pre = '') |
177 | 177 | { |
178 | - $str = $pre . $this->stream->read($length); |
|
178 | + $str = $pre.$this->stream->read($length); |
|
179 | 179 | $len = \strlen($str); |
180 | 180 | |
181 | - if ($len > 0 && ! \preg_match('/^[0-9a-f]{2}$|^[\r\n]{1,2}.?$/is', $str) && $this->stream->isSeekable()) { |
|
181 | + if ($len > 0 && !\preg_match('/^[0-9a-f]{2}$|^[\r\n]{1,2}.?$/is', $str) && $this->stream->isSeekable()) { |
|
182 | 182 | $this->stream->seek(-$len, SEEK_CUR); |
183 | 183 | |
184 | - return '3D'; // '=' character |
|
184 | + return '3D'; // '=' character |
|
185 | 185 | } |
186 | 186 | |
187 | 187 | return $str; |
@@ -176,7 +176,7 @@ |
||
176 | 176 | */ |
177 | 177 | private function readRawCharsIntoBuffer($length) |
178 | 178 | { |
179 | - $n = (int)\ceil(($length + 32) / 4.0) * 4; |
|
179 | + $n = (int) \ceil(($length + 32) / 4.0) * 4; |
|
180 | 180 | |
181 | 181 | while ($this->bufferLength < $n) { |
182 | 182 | $raw = $this->stream->read($n + 512); |
@@ -164,7 +164,7 @@ |
||
164 | 164 | */ |
165 | 165 | public function write($string) |
166 | 166 | { |
167 | - $bytes = $this->remainder . $string; |
|
167 | + $bytes = $this->remainder.$string; |
|
168 | 168 | $len = \strlen($bytes); |
169 | 169 | |
170 | 170 | if (($len % 3) !== 0) { |
@@ -106,7 +106,7 @@ |
||
106 | 106 | */ |
107 | 107 | private function fillBuffer($length) |
108 | 108 | { |
109 | - $fill = (int)\max([$length, 8192]); |
|
109 | + $fill = (int) \max([$length, 8192]); |
|
110 | 110 | |
111 | 111 | while ($this->buffer->getSize() < $length) { |
112 | 112 | $read = $this->stream->read($fill); |
@@ -112,12 +112,12 @@ |
||
112 | 112 | $next = $this->lineLength - ($this->position % ($this->lineLength + $this->lineEndingLength)); |
113 | 113 | |
114 | 114 | if (\strlen($string) > $next) { |
115 | - $firstLine = \substr($string, 0, $next) . $this->lineEnding; |
|
115 | + $firstLine = \substr($string, 0, $next).$this->lineEnding; |
|
116 | 116 | $string = \substr($string, $next); |
117 | 117 | } |
118 | 118 | } |
119 | 119 | // chunk_split always ends with the passed line ending |
120 | - $chunked = $firstLine . \chunk_split($string, $this->lineLength, $this->lineEnding); |
|
120 | + $chunked = $firstLine.\chunk_split($string, $this->lineLength, $this->lineEnding); |
|
121 | 121 | |
122 | 122 | return \substr($chunked, 0, \strlen($chunked) - $this->lineEndingLength); |
123 | 123 | } |