@@ -87,7 +87,7 @@ |
||
| 87 | 87 | */ |
| 88 | 88 | public function apply($input) |
| 89 | 89 | { |
| 90 | - return (string) Multiline::create($input)->setEol($this); |
|
| 90 | + return (string)Multiline::create($input)->setEol($this); |
|
| 91 | 91 | } |
| 92 | 92 | |
| 93 | 93 | /** |
@@ -84,7 +84,7 @@ |
||
| 84 | 84 | /** |
| 85 | 85 | * getLastCommand returns the string last used by a previous call to `run()`. |
| 86 | 86 | * |
| 87 | - * @return string|null |
|
| 87 | + * @return string |
|
| 88 | 88 | */ |
| 89 | 89 | public function getLastCommand() |
| 90 | 90 | { |
@@ -88,14 +88,14 @@ discard block |
||
| 88 | 88 | public static function ensureInteger($value) |
| 89 | 89 | { |
| 90 | 90 | $numeric = self::ensure($value); |
| 91 | - if ((float) (int) $numeric !== (float) $numeric) { |
|
| 91 | + if ((float)(int)$numeric !== (float)$numeric) { |
|
| 92 | 92 | throw new \InvalidArgumentException(sprintf( |
| 93 | 93 | "Could not safely convert value '%s' of type '%s' to integer because of trailing decimal places.", |
| 94 | 94 | $value, |
| 95 | 95 | Type::summarize($value) |
| 96 | 96 | )); |
| 97 | 97 | } |
| 98 | - return (int) $numeric; |
|
| 98 | + return (int)$numeric; |
|
| 99 | 99 | } |
| 100 | 100 | |
| 101 | 101 | /** |
@@ -118,6 +118,6 @@ discard block |
||
| 118 | 118 | */ |
| 119 | 119 | public static function ensureFloat($value) |
| 120 | 120 | { |
| 121 | - return (float) self::ensure($value); |
|
| 121 | + return (float)self::ensure($value); |
|
| 122 | 122 | } |
| 123 | 123 | } |
@@ -191,10 +191,10 @@ |
||
| 191 | 191 | */ |
| 192 | 192 | private function trimPrecision($number) |
| 193 | 193 | { |
| 194 | - if ($this->precisionTrimming && strpos((string) $number, '.') !== false) { |
|
| 194 | + if ($this->precisionTrimming && strpos((string)$number, '.') !== false) { |
|
| 195 | 195 | $number = rtrim($number, '0'); |
| 196 | 196 | $number = rtrim($number, '.'); |
| 197 | - $number = (double) $number; |
|
| 197 | + $number = (double)$number; |
|
| 198 | 198 | } |
| 199 | 199 | return $number; |
| 200 | 200 | } |
@@ -176,13 +176,13 @@ |
||
| 176 | 176 | $stepValue = floor($seconds / $minValue); |
| 177 | 177 | if ($stepValue > 0) { |
| 178 | 178 | $suffix = Quantity::format($suffix, $stepValue); |
| 179 | - $parts[] = $stepValue . $suffix; |
|
| 179 | + $parts[] = $stepValue.$suffix; |
|
| 180 | 180 | $seconds -= $stepValue * $minValue; |
| 181 | 181 | } |
| 182 | 182 | } |
| 183 | 183 | } |
| 184 | 184 | if (count($parts) === 0) { |
| 185 | - $parts[] = $seconds . Quantity::format($steps[self::SECOND], $seconds); |
|
| 185 | + $parts[] = $seconds.Quantity::format($steps[self::SECOND], $seconds); |
|
| 186 | 186 | } |
| 187 | 187 | if ($this->limit > 0) { |
| 188 | 188 | $parts = array_slice($parts, 0, $this->limit); |
@@ -26,9 +26,9 @@ |
||
| 26 | 26 | $path = implode(DIRECTORY_SEPARATOR, $paths); |
| 27 | 27 | $path = self::localize($path); |
| 28 | 28 | $quotedSeparator = preg_quote(DIRECTORY_SEPARATOR); |
| 29 | - $pattern = '#' . $quotedSeparator . '+#'; |
|
| 29 | + $pattern = '#'.$quotedSeparator.'+#'; |
|
| 30 | 30 | $path = preg_replace($pattern, $quotedSeparator, $path); |
| 31 | - return $scheme . $path; |
|
| 31 | + return $scheme.$path; |
|
| 32 | 32 | } |
| 33 | 33 | |
| 34 | 34 | /** |
@@ -116,7 +116,7 @@ |
||
| 116 | 116 | foreach ($array as $key => $value) { |
| 117 | 117 | $keypath = self::escapeKey($key); |
| 118 | 118 | if ($parent !== null) { |
| 119 | - $keypath = $parent . '.' . $keypath; |
|
| 119 | + $keypath = $parent.'.'.$keypath; |
|
| 120 | 120 | } |
| 121 | 121 | if (is_array($value)) { |
| 122 | 122 | $flat = array_merge(self::flatten($value, $keypath), $flat); |
@@ -129,9 +129,9 @@ |
||
| 129 | 129 | $foo .= mb_substr($padding, 0, $partialPadLength); |
| 130 | 130 | } |
| 131 | 131 | if ($paddingType === STR_PAD_LEFT) { |
| 132 | - return $foo . $input; |
|
| 132 | + return $foo.$input; |
|
| 133 | 133 | } |
| 134 | - return $input . $foo; |
|
| 134 | + return $input.$foo; |
|
| 135 | 135 | } |
| 136 | 136 | |
| 137 | 137 | /** |
@@ -43,7 +43,7 @@ |
||
| 43 | 43 | // 'whereis' does not use status codes. Check for a matching line instead. |
| 44 | 44 | $exec->run('whereis', '-b', $binaryName); |
| 45 | 45 | foreach ($exec->getOutput() as $line) { |
| 46 | - if (preg_match('/^' . preg_quote($binaryName) . ': .*$/', $line) === 1) { |
|
| 46 | + if (preg_match('/^'.preg_quote($binaryName).': .*$/', $line) === 1) { |
|
| 47 | 47 | return true; |
| 48 | 48 | } |
| 49 | 49 | } |