@@ -37,7 +37,7 @@ |
||
| 37 | 37 | { |
| 38 | 38 | // PDOException::getCode() is a string. |
| 39 | 39 | // @see https://php.net/manual/en/class.pdoexception.php#95812 |
| 40 | - parent::__construct($t->getMessage(), (int) $t->getCode()); |
|
| 40 | + parent::__construct($t->getMessage(), (int)$t->getCode()); |
|
| 41 | 41 | $this->setOriginalException($t); |
| 42 | 42 | } |
| 43 | 43 | |
@@ -1833,7 +1833,7 @@ discard block |
||
| 1833 | 1833 | $this->output = \ob_get_contents(); |
| 1834 | 1834 | |
| 1835 | 1835 | if ($this->outputCallback !== false) { |
| 1836 | - $this->output = (string) \call_user_func($this->outputCallback, $this->output); |
|
| 1836 | + $this->output = (string)\call_user_func($this->outputCallback, $this->output); |
|
| 1837 | 1837 | } |
| 1838 | 1838 | |
| 1839 | 1839 | \ob_end_clean(); |
@@ -1921,7 +1921,7 @@ discard block |
||
| 1921 | 1921 | return new Snapshot( |
| 1922 | 1922 | $blacklist, |
| 1923 | 1923 | $backupGlobals, |
| 1924 | - (bool) $this->backupStaticAttributes, |
|
| 1924 | + (bool)$this->backupStaticAttributes, |
|
| 1925 | 1925 | false, |
| 1926 | 1926 | false, |
| 1927 | 1927 | false, |
@@ -128,6 +128,6 @@ |
||
| 128 | 128 | } |
| 129 | 129 | |
| 130 | 130 | // Keep BC even if we know that array would not be the expected one |
| 131 | - return (array) $other; |
|
| 131 | + return (array)$other; |
|
| 132 | 132 | } |
| 133 | 133 | } |
@@ -39,7 +39,7 @@ |
||
| 39 | 39 | */ |
| 40 | 40 | protected function matches($other): bool |
| 41 | 41 | { |
| 42 | - return (string) $other->getCode() === (string) $this->expectedCode; |
|
| 42 | + return (string)$other->getCode() === (string)$this->expectedCode; |
|
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | /** |
@@ -124,11 +124,11 @@ |
||
| 124 | 124 | ['1 byte', 1], |
| 125 | 125 | ['1023 bytes', 1023], |
| 126 | 126 | ['1.00 KB', 1024], |
| 127 | - ['1.50 KB', 1.5 * 1024], |
|
| 128 | - ['2.00 MB', 2 * 1048576], |
|
| 129 | - ['2.50 MB', 2.5 * 1048576], |
|
| 130 | - ['3.00 GB', 3 * 1073741824], |
|
| 131 | - ['3.50 GB', 3.5 * 1073741824], |
|
| 127 | + ['1.50 KB', 1.5*1024], |
|
| 128 | + ['2.00 MB', 2*1048576], |
|
| 129 | + ['2.50 MB', 2.5*1048576], |
|
| 130 | + ['3.00 GB', 3*1073741824], |
|
| 131 | + ['3.50 GB', 3.5*1073741824], |
|
| 132 | 132 | ]; |
| 133 | 133 | } |
| 134 | 134 | } |
@@ -48,20 +48,20 @@ |
||
| 48 | 48 | { |
| 49 | 49 | foreach (self::$sizes as $unit => $value) { |
| 50 | 50 | if ($bytes >= $value) { |
| 51 | - return \sprintf('%.2f %s', $bytes >= 1024 ? $bytes / $value : $bytes, $unit); |
|
| 51 | + return \sprintf('%.2f %s', $bytes >= 1024 ? $bytes/$value : $bytes, $unit); |
|
| 52 | 52 | } |
| 53 | 53 | } |
| 54 | 54 | |
| 55 | - return $bytes . ' byte' . ((int) $bytes !== 1 ? 's' : ''); |
|
| 55 | + return $bytes . ' byte' . ((int)$bytes !== 1 ? 's' : ''); |
|
| 56 | 56 | } |
| 57 | 57 | |
| 58 | 58 | public static function secondsToTimeString(float $time): string |
| 59 | 59 | { |
| 60 | - $ms = \round($time * 1000); |
|
| 60 | + $ms = \round($time*1000); |
|
| 61 | 61 | |
| 62 | 62 | foreach (self::$times as $unit => $value) { |
| 63 | 63 | if ($ms >= $value) { |
| 64 | - $time = \floor($ms / $value * 100.0) / 100.0; |
|
| 64 | + $time = \floor($ms/$value*100.0)/100.0; |
|
| 65 | 65 | |
| 66 | 66 | return $time . ' ' . ($time == 1 ? $unit : $unit . 's'); |
| 67 | 67 | } |
@@ -1,7 +1,7 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | $function1 = function($foo, $bar) use ($var) {}; |
| 3 | 3 | $function2 = function(Foo $foo, $bar) use ($var) {}; |
| 4 | -$function3 = function ($foo, $bar, $baz) {}; |
|
| 5 | -$function4 = function (Foo $foo, $bar, $baz) {}; |
|
| 6 | -$function5 = function () {}; |
|
| 4 | +$function3 = function($foo, $bar, $baz) {}; |
|
| 5 | +$function4 = function(Foo $foo, $bar, $baz) {}; |
|
| 6 | +$function5 = function() {}; |
|
| 7 | 7 | $function6 = function() {}; |
@@ -15,11 +15,11 @@ |
||
| 15 | 15 | } |
| 16 | 16 | }; |
| 17 | 17 | |
| 18 | - $f = function ($a, $b) { |
|
| 18 | + $f = function($a, $b) { |
|
| 19 | 19 | return $a + $b; |
| 20 | 20 | }; |
| 21 | 21 | |
| 22 | - $g = function ($a, $b) { |
|
| 22 | + $g = function($a, $b) { |
|
| 23 | 23 | return $a - $b; |
| 24 | 24 | }; |
| 25 | 25 | } |
@@ -2,7 +2,7 @@ |
||
| 2 | 2 | /** |
| 3 | 3 | * Some comment |
| 4 | 4 | */ |
| 5 | -class Foo{function foo(){} |
|
| 5 | +class Foo {function foo() {} |
|
| 6 | 6 | |
| 7 | 7 | /** |
| 8 | 8 | * @param Baz $baz |