@@ -18,7 +18,7 @@ |
||
18 | 18 | 'sort_class_interfaces' => true |
19 | 19 | ]); |
20 | 20 | |
21 | -$sami['filter'] = function () { |
|
21 | +$sami['filter'] = function() { |
|
22 | 22 | return new PublicFilter(); |
23 | 23 | }; |
24 | 24 |
@@ -76,35 +76,35 @@ |
||
76 | 76 | * @return FileDescriptor |
77 | 77 | * @internal |
78 | 78 | */ |
79 | - public function current (): FileDescriptor { |
|
79 | + public function current(): FileDescriptor { |
|
80 | 80 | return FileDescriptor::fromFileInfo($this->getIterator()->current()); |
81 | 81 | } |
82 | 82 | |
83 | 83 | /** |
84 | 84 | * @internal |
85 | 85 | */ |
86 | - public function key () { |
|
86 | + public function key() { |
|
87 | 87 | return $this->getIterator()->key(); |
88 | 88 | } |
89 | 89 | |
90 | 90 | /** |
91 | 91 | * @internal |
92 | 92 | */ |
93 | - public function next () { |
|
93 | + public function next() { |
|
94 | 94 | $this->getIterator()->next(); |
95 | 95 | } |
96 | 96 | |
97 | 97 | /** |
98 | 98 | * @internal |
99 | 99 | */ |
100 | - public function rewind () { |
|
100 | + public function rewind() { |
|
101 | 101 | $this->getIterator()->rewind(); |
102 | 102 | } |
103 | 103 | |
104 | 104 | /** |
105 | 105 | * @internal |
106 | 106 | */ |
107 | - public function valid () { |
|
107 | + public function valid() { |
|
108 | 108 | return $this->getIterator()->valid(); |
109 | 109 | } |
110 | 110 |
@@ -281,7 +281,6 @@ |
||
281 | 281 | * Copies the file |
282 | 282 | * |
283 | 283 | * If the destination file already exists, it will be overwritten. |
284 | - |
|
285 | 284 | * @param string|Path $destination The destination path. |
286 | 285 | * @throws FileException When an error appeared. |
287 | 286 | */ |
@@ -33,7 +33,7 @@ |
||
33 | 33 | * @param string|Text $pathname |
34 | 34 | */ |
35 | 35 | protected function init($pathname): void { |
36 | - $this->pathname = ''.$pathname; // "cast" to string |
|
36 | + $this->pathname = '' . $pathname; // "cast" to string |
|
37 | 37 | } |
38 | 38 | |
39 | 39 | /** |
@@ -95,7 +95,7 @@ |
||
95 | 95 | * @return Text |
96 | 96 | */ |
97 | 97 | public function getPathname(): Text { |
98 | - return new Text ($this->stream . $this->pathname); |
|
98 | + return new Text($this->stream . $this->pathname); |
|
99 | 99 | } |
100 | 100 | |
101 | 101 | /** |
@@ -26,7 +26,7 @@ |
||
26 | 26 | * @throws \InvalidArgumentException If the objects don't implement phootwork\lang\Comparable interface. |
27 | 27 | */ |
28 | 28 | public function compare($a, $b): int { |
29 | - if (! $a instanceof Comparable) { |
|
29 | + if (!$a instanceof Comparable) { |
|
30 | 30 | throw new \InvalidArgumentException( |
31 | 31 | "ComparableComparator can compare only objects implementing phootwork\lang\Comparable interface"); |
32 | 32 | } |
@@ -13,7 +13,7 @@ |
||
13 | 13 | class JsonException extends \Exception { |
14 | 14 | |
15 | 15 | public function __construct(string $message = '', int $code = 0, \Exception $previous = null) { |
16 | - $message = json_last_error_msg(); |
|
16 | + $message = json_last_error_msg(); |
|
17 | 17 | parent::__construct($message, $code, $previous); |
18 | 18 | } |
19 | 19 | } |
@@ -273,7 +273,7 @@ discard block |
||
273 | 273 | return mb_substr_count($this->string, (string) $substring, $this->encoding); |
274 | 274 | } |
275 | 275 | $str = mb_strtoupper($this->string, $this->encoding); |
276 | - $substring = mb_strtoupper( (string) $substring, $this->encoding); |
|
276 | + $substring = mb_strtoupper((string) $substring, $this->encoding); |
|
277 | 277 | |
278 | 278 | return mb_substr_count($str, (string) $substring, $this->encoding); |
279 | 279 | } |
@@ -824,7 +824,7 @@ discard block |
||
824 | 824 | */ |
825 | 825 | public function toCapitalCaseWords(): Text { |
826 | 826 | $encoding = $this->encoding; |
827 | - return $this->split(' ')->map(function (string $str) use ($encoding) { |
|
827 | + return $this->split(' ')->map(function(string $str) use ($encoding) { |
|
828 | 828 | return Text::create($str, $encoding)->toCapitalCase(); |
829 | 829 | })->join(' '); |
830 | 830 | } |
@@ -884,7 +884,7 @@ discard block |
||
884 | 884 | return $input; |
885 | 885 | } |
886 | 886 | $encoding = $this->encoding; |
887 | - return Text::create(preg_replace_callback('/([A-Z-_][a-z0-9]+)/', function (array $matches) use ($encoding) { |
|
887 | + return Text::create(preg_replace_callback('/([A-Z-_][a-z0-9]+)/', function(array $matches) use ($encoding) { |
|
888 | 888 | return Text::create($matches[0], $encoding)->replace(['-', '_'], '')->toUpperCaseFirst(); |
889 | 889 | }, $input->toString()), $this->encoding)->toUpperCaseFirst(); |
890 | 890 | } |
@@ -114,7 +114,7 @@ |
||
114 | 114 | * @param mixed $v |
115 | 115 | * @return mixed |
116 | 116 | */ |
117 | - function ($v) { |
|
117 | + function($v) { |
|
118 | 118 | if (is_object($v) && method_exists($v, 'toArray')) { |
119 | 119 | return static::toArrayRecursive($v); |
120 | 120 | } |
@@ -258,7 +258,7 @@ |
||
258 | 258 | * @param mixed $b |
259 | 259 | * @return int |
260 | 260 | */ |
261 | - function ($a, $b) use ($cmp): int { |
|
261 | + function($a, $b) use ($cmp): int { |
|
262 | 262 | return $cmp->compare($a, $b); |
263 | 263 | } |
264 | 264 | ); |