@@ -55,7 +55,7 @@ |
||
| 55 | 55 | private const WHEN_KEY = 'when'; |
| 56 | 56 | private const WHEN = [-1 => 'less', |
| 57 | 57 | 0 => 'equal', |
| 58 | - 1 => 'more',]; |
|
| 58 | + 1 => 'more', ]; |
|
| 59 | 59 | |
| 60 | 60 | public function __toString(): string |
| 61 | 61 | { |
@@ -243,7 +243,7 @@ |
||
| 243 | 243 | return implode( |
| 244 | 244 | ' ', |
| 245 | 245 | array_map( |
| 246 | - function ($arg) { |
|
| 246 | + function($arg) { |
|
| 247 | 247 | return self::quoteArgument($arg, $this->escape); |
| 248 | 248 | }, |
| 249 | 249 | $lines |
@@ -101,7 +101,7 @@ |
||
| 101 | 101 | { |
| 102 | 102 | array_walk( |
| 103 | 103 | Phing::getProperties(), |
| 104 | - static function ($v, $k) use ($out) { |
|
| 104 | + static function($v, $k) use ($out) { |
|
| 105 | 105 | $out->println($k . ' : ' . $v); |
| 106 | 106 | } |
| 107 | 107 | ); |
@@ -50,7 +50,7 @@ |
||
| 50 | 50 | public function getTimes() |
| 51 | 51 | { |
| 52 | 52 | return array_map( |
| 53 | - function (Duration $elem) { |
|
| 53 | + function(Duration $elem) { |
|
| 54 | 54 | return $elem->getTime(); |
| 55 | 55 | }, |
| 56 | 56 | $this->list |
@@ -32,15 +32,15 @@ |
||
| 32 | 32 | const B = 'B'; |
| 33 | 33 | const KILO = 1000; |
| 34 | 34 | const KIBI = 1024; |
| 35 | - const SI = [1 => ['kB', 'kilo', 'kilobyte',], |
|
| 36 | - 2 => ['MB', 'mega', 'megabyte',], |
|
| 37 | - 3 => ['GB', 'giga', 'gigabyte',], |
|
| 38 | - 4 => ['TB', 'tera', 'terabyte',],]; |
|
| 39 | - const IEC = [0 => [self::B,], |
|
| 40 | - 1 => ['k', 'Ki', 'KiB', 'kibi', 'kibibyte',], |
|
| 41 | - 2 => ['M', 'Mi', 'MiB', 'mebi', 'mebibyte',], |
|
| 42 | - 3 => ['G', 'Gi', 'GiB', 'gibi', 'gibibyte',], |
|
| 43 | - 4 => ['T', 'Ti', 'TiB', 'tebi', 'tebibyte',],]; |
|
| 35 | + const SI = [1 => ['kB', 'kilo', 'kilobyte', ], |
|
| 36 | + 2 => ['MB', 'mega', 'megabyte', ], |
|
| 37 | + 3 => ['GB', 'giga', 'gigabyte', ], |
|
| 38 | + 4 => ['TB', 'tera', 'terabyte', ], ]; |
|
| 39 | + const IEC = [0 => [self::B, ], |
|
| 40 | + 1 => ['k', 'Ki', 'KiB', 'kibi', 'kibibyte', ], |
|
| 41 | + 2 => ['M', 'Mi', 'MiB', 'mebi', 'mebibyte', ], |
|
| 42 | + 3 => ['G', 'Gi', 'GiB', 'gibi', 'gibibyte', ], |
|
| 43 | + 4 => ['T', 'Ti', 'TiB', 'tebi', 'tebibyte', ], ]; |
|
| 44 | 44 | |
| 45 | 45 | /** |
| 46 | 46 | * Converts strings like '512K', '0.5G', '50M' to bytes. |
@@ -1242,7 +1242,7 @@ |
||
| 1242 | 1242 | */ |
| 1243 | 1243 | private function findSuggestion(string $unknownTarget): ?Target |
| 1244 | 1244 | { |
| 1245 | - return array_reduce($this->targets, function (?Target $carry, Target $current) use ($unknownTarget): ?Target { |
|
| 1245 | + return array_reduce($this->targets, function(?Target $carry, Target $current) use ($unknownTarget) : ?Target { |
|
| 1246 | 1246 | // Omit target with empty name (there's always one) |
| 1247 | 1247 | if (empty(strval($current))) { |
| 1248 | 1248 | return $carry; |
@@ -100,7 +100,7 @@ |
||
| 100 | 100 | $value = $p->getParams(); |
| 101 | 101 | array_walk_recursive( |
| 102 | 102 | $value, |
| 103 | - function (&$item) { |
|
| 103 | + function(&$item) { |
|
| 104 | 104 | if ($item instanceof Parameter) { |
| 105 | 105 | $item = $item->getValue(); |
| 106 | 106 | } |
@@ -104,7 +104,7 @@ |
||
| 104 | 104 | */ |
| 105 | 105 | private function filterValidTasks(array $classes): array |
| 106 | 106 | { |
| 107 | - return array_filter($classes, function ($classname) { |
|
| 107 | + return array_filter($classes, function($classname) { |
|
| 108 | 108 | $t = new \ReflectionClass($classname); |
| 109 | 109 | |
| 110 | 110 | if (!$t->isSubclassOf(Task::class) || !$t->isInstantiable()) { |
@@ -121,8 +121,7 @@ |
||
| 121 | 121 | */ |
| 122 | 122 | public function main() |
| 123 | 123 | { |
| 124 | - $fail = $this->nestedConditionPresent() ? $this->testNestedCondition() : |
|
| 125 | - $this->testIfCondition() && $this->testUnlessCondition(); |
|
| 124 | + $fail = $this->nestedConditionPresent() ? $this->testNestedCondition() : $this->testIfCondition() && $this->testUnlessCondition(); |
|
| 126 | 125 | |
| 127 | 126 | if ($fail) { |
| 128 | 127 | $text = null; |