@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | |
| 4 | 4 | namespace ReadModel\Filters; |
| 5 | 5 | |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | |
| 4 | 4 | namespace ReadModel\Walker; |
| 5 | 5 | |
@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | |
| 4 | 4 | namespace ReadModel\Walker; |
| 5 | 5 | |
@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | |
| 21 | 21 | public function walk(array $result): array |
| 22 | 22 | { |
| 23 | - array_walk($result, function (&$value, $key) { |
|
| 23 | + array_walk($result, function(&$value, $key) { |
|
| 24 | 24 | if ($value === null || !isset($this->typeMapping[$key])) { |
| 25 | 25 | return; |
| 26 | 26 | } |
@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | |
| 4 | 4 | namespace ReadModel\Walker; |
| 5 | 5 | |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | private function embed(string $prefix, array $result): array |
| 32 | 32 | { |
| 33 | 33 | // filter out prefixed fields |
| 34 | - $prefixed = array_filter($result, function ($key) use ($prefix) { |
|
| 34 | + $prefixed = array_filter($result, function($key) use ($prefix) { |
|
| 35 | 35 | return substr($key, 0, strlen($prefix)) === $prefix; |
| 36 | 36 | }, ARRAY_FILTER_USE_KEY); |
| 37 | 37 | |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | // remove prefix from field's name |
| 44 | - $keys = array_map(function ($key) use ($prefix) { |
|
| 44 | + $keys = array_map(function($key) use ($prefix) { |
|
| 45 | 45 | return substr($key, strlen($prefix.'_')); |
| 46 | 46 | }, array_keys($prefixed)); |
| 47 | 47 | |
@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | |
| 4 | 4 | namespace ReadModel\Walker; |
| 5 | 5 | |
@@ -19,7 +19,7 @@ discard block |
||
| 19 | 19 | |
| 20 | 20 | public function walk(array $result): array |
| 21 | 21 | { |
| 22 | - array_walk($result, function (&$value, $key) { |
|
| 22 | + array_walk($result, function(&$value, $key) { |
|
| 23 | 23 | if ($value === null || !isset($this->keys[$key])) { |
| 24 | 24 | return; |
| 25 | 25 | } |
@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | |
| 4 | 4 | namespace ReadModel\Walker; |
| 5 | 5 | |
@@ -9,7 +9,7 @@ discard block |
||
| 9 | 9 | { |
| 10 | 10 | $camelCased = []; |
| 11 | 11 | |
| 12 | - array_walk($result, function ($value, $key) use (&$camelCased) { |
|
| 12 | + array_walk($result, function($value, $key) use (&$camelCased) { |
|
| 13 | 13 | $key = is_string($key) ? $this->toCamelCase($key) : $key; |
| 14 | 14 | |
| 15 | 15 | if (is_array($value)) { |
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | |
| 25 | 25 | private function toCamelCase(string $value): string |
| 26 | 26 | { |
| 27 | - $camelCasedName = preg_replace_callback('/(^|_|\.)+(.)/', function ($match) { |
|
| 27 | + $camelCasedName = preg_replace_callback('/(^|_|\.)+(.)/', function($match) { |
|
| 28 | 28 | return ('.' === $match[1] ? '_' : '').strtoupper($match[2]); |
| 29 | 29 | }, $value); |
| 30 | 30 | |
@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | |
| 4 | 4 | namespace ReadModel; |
| 5 | 5 | |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | |
| 46 | 46 | private function resolveMeta(): array |
| 47 | 47 | { |
| 48 | - return array_map(function ($value) { |
|
| 48 | + return array_map(function($value) { |
|
| 49 | 49 | // execute callables |
| 50 | 50 | if (is_callable($value)) { |
| 51 | 51 | $value = call_user_func($value); |
@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | |
| 4 | 4 | namespace ReadModel; |
| 5 | 5 | |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | $results = parent::getResults(); |
| 27 | 27 | Assertion::allIsArray($results, 'For WalkablePaginator getResults() method must return array of arrays'); |
| 28 | 28 | |
| 29 | - return array_map(function (array $row) { |
|
| 29 | + return array_map(function(array $row) { |
|
| 30 | 30 | return $this->resultWalker->walk($row); |
| 31 | 31 | }, $results); |
| 32 | 32 | } |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | |
| 4 | 4 | namespace ReadModel; |
| 5 | 5 | |