@@ -50,8 +50,8 @@ discard block |
||
| 50 | 50 | private function writeLevel($level) |
| 51 | 51 | { |
| 52 | 52 | $message = str_pad(sprintf( |
| 53 | - '[%s]', |
|
| 54 | - strtoupper($level) |
|
| 53 | + '[%s]', |
|
| 54 | + strtoupper($level) |
|
| 55 | 55 | ), 10); |
| 56 | 56 | |
| 57 | 57 | $this->output->write($this->colorizeMessage($level, $message)); |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | if(isset($colors[$level])) |
| 68 | 68 | { |
| 69 | 69 | $message = sprintf( |
| 70 | - '<%1$s>%2$s</%1$s>', |
|
| 70 | + '<%1$s>%2$s</%1$s>', |
|
| 71 | 71 | 'fg=' . $colors[$level], |
| 72 | 72 | $message |
| 73 | 73 | ); |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types = 1); |
|
| 3 | +declare(strict_types=1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Karma\Logging; |
| 6 | 6 | |
@@ -56,7 +56,7 @@ |
||
| 56 | 56 | catch(ParseException $e) |
| 57 | 57 | { |
| 58 | 58 | throw new \RuntimeException(sprintf( |
| 59 | - 'Error while parsing profile : %s', |
|
| 59 | + 'Error while parsing profile : %s', |
|
| 60 | 60 | $e->getMessage() |
| 61 | 61 | )); |
| 62 | 62 | } |
@@ -191,8 +191,7 @@ |
||
| 191 | 191 | if( |
| 192 | 192 | ! array_key_exists($parameter, $parameterValidators) |
| 193 | 193 | || ! $parameterValidators[$parameter] instanceof \Closure |
| 194 | - ) |
|
| 195 | - { |
|
| 194 | + ) { |
|
| 196 | 195 | return true; |
| 197 | 196 | } |
| 198 | 197 | |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types = 1); |
|
| 3 | +declare(strict_types=1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Karma; |
| 6 | 6 | |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | |
| 68 | 68 | foreach(array_keys($this->attributes) as $name) |
| 69 | 69 | { |
| 70 | - if(! isset($values[$name])) |
|
| 70 | + if( ! isset($values[$name])) |
|
| 71 | 71 | { |
| 72 | 72 | continue; |
| 73 | 73 | } |
@@ -198,7 +198,7 @@ discard block |
||
| 198 | 198 | return true; |
| 199 | 199 | } |
| 200 | 200 | |
| 201 | - if(! $parameterValidators[$parameter]($value)) |
|
| 201 | + if( ! $parameterValidators[$parameter]($value)) |
|
| 202 | 202 | { |
| 203 | 203 | throw new \RuntimeException('Paramater %s format is invalid'); |
| 204 | 204 | } |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types = 1); |
|
| 3 | +declare(strict_types=1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Karma; |
| 6 | 6 | |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types = 1); |
|
| 3 | +declare(strict_types=1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Karma\FormatterProviders; |
| 6 | 6 | |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types = 1); |
|
| 3 | +declare(strict_types=1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Karma\FormatterProviders; |
| 6 | 6 | |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types = 1); |
|
| 3 | +declare(strict_types=1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Karma\FormatterProviders; |
| 6 | 6 | |
@@ -32,14 +32,14 @@ discard block |
||
| 32 | 32 | |
| 33 | 33 | private function parseFormatters($content): void |
| 34 | 34 | { |
| 35 | - if(! is_array($content)) |
|
| 35 | + if( ! is_array($content)) |
|
| 36 | 36 | { |
| 37 | 37 | throw new \InvalidArgumentException('Syntax error in profile [formatters]'); |
| 38 | 38 | } |
| 39 | 39 | |
| 40 | 40 | foreach($content as $name => $rules) |
| 41 | 41 | { |
| 42 | - if(! is_array($rules)) |
|
| 42 | + if( ! is_array($rules)) |
|
| 43 | 43 | { |
| 44 | 44 | throw new \InvalidArgumentException('Syntax error in profile [formatters]'); |
| 45 | 45 | } |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types = 1); |
|
| 3 | +declare(strict_types=1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Karma; |
| 6 | 6 | |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types = 1); |
|
| 3 | +declare(strict_types=1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Karma; |
| 6 | 6 | |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types = 1); |
|
| 3 | +declare(strict_types=1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Karma\Display; |
| 6 | 6 | |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | $lines = array(); |
| 70 | 70 | $lines[] = $separatorRow; |
| 71 | 71 | |
| 72 | - if(! empty($this->headers)) |
|
| 72 | + if( ! empty($this->headers)) |
|
| 73 | 73 | { |
| 74 | 74 | $lines[] = $this->renderLine($this->headers); |
| 75 | 75 | $lines[] = $separatorRow; |
@@ -92,7 +92,7 @@ discard block |
||
| 92 | 92 | return; |
| 93 | 93 | } |
| 94 | 94 | |
| 95 | - if(! empty($this->headers)) |
|
| 95 | + if( ! empty($this->headers)) |
|
| 96 | 96 | { |
| 97 | 97 | array_unshift($this->headers, ''); |
| 98 | 98 | } |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | |
| 111 | 111 | $this->columnsSize = array_pad(array(), $this->nbColumns, -1); |
| 112 | 112 | |
| 113 | - if(! empty($this->headers)) |
|
| 113 | + if( ! empty($this->headers)) |
|
| 114 | 114 | { |
| 115 | 115 | $this->updateColumnsSize(array($this->headers)); |
| 116 | 116 | } |
@@ -124,7 +124,7 @@ discard block |
||
| 124 | 124 | |
| 125 | 125 | foreach($this->rows as $row) |
| 126 | 126 | { |
| 127 | - if(is_array($row) ||$row instanceof \Countable) |
|
| 127 | + if(is_array($row) || $row instanceof \Countable) |
|
| 128 | 128 | { |
| 129 | 129 | $this->nbColumns = max($this->nbColumns, count($row)); |
| 130 | 130 | } |
@@ -137,7 +137,7 @@ discard block |
||
| 137 | 137 | { |
| 138 | 138 | foreach($newValues as $row) |
| 139 | 139 | { |
| 140 | - if(! is_array($row)) |
|
| 140 | + if( ! is_array($row)) |
|
| 141 | 141 | { |
| 142 | 142 | throw new \InvalidArgumentException('Rows must be arrays'); |
| 143 | 143 | } |
@@ -187,7 +187,7 @@ discard block |
||
| 187 | 187 | |
| 188 | 188 | private function stripTags($value) |
| 189 | 189 | { |
| 190 | - return preg_replace ('/<[^>]*>/', '', $value); |
|
| 190 | + return preg_replace('/<[^>]*>/', '', $value); |
|
| 191 | 191 | } |
| 192 | 192 | |
| 193 | 193 | private function renderLine(array $row) |