@@ -32,6 +32,6 @@ |
||
| 32 | 32 | */ |
| 33 | 33 | public function jsonSerialize(): array |
| 34 | 34 | { |
| 35 | - return array_map(static fn (WordDto $word): array => $word->jsonSerialize(), $this->words); |
|
| 35 | + return array_map(static fn(WordDto $word): array => $word->jsonSerialize(), $this->words); |
|
| 36 | 36 | } |
| 37 | 37 | } |
@@ -20,7 +20,7 @@ |
||
| 20 | 20 | public function __construct(array $words) |
| 21 | 21 | { |
| 22 | 22 | $this->words = array_map( |
| 23 | - static fn (array $attributes): StorageWordDto => new StorageWordDto($attributes), |
|
| 23 | + static fn(array $attributes): StorageWordDto => new StorageWordDto($attributes), |
|
| 24 | 24 | $words |
| 25 | 25 | ); |
| 26 | 26 | } |
@@ -88,7 +88,7 @@ |
||
| 88 | 88 | */ |
| 89 | 89 | public function mask(): RowMask |
| 90 | 90 | { |
| 91 | - $mask = array_map(static fn (Cell $cell): string => $cell->letter() ?: '.', $this->cells); |
|
| 91 | + $mask = array_map(static fn(Cell $cell): string => $cell->letter() ?: '.', $this->cells); |
|
| 92 | 92 | $mask = implode('', $mask); |
| 93 | 93 | while (substr($mask, -1) === '.') { |
| 94 | 94 | $mask = substr($mask, 0, -1); |
@@ -30,7 +30,7 @@ |
||
| 30 | 30 | |
| 31 | 31 | public function isEmpty(): bool |
| 32 | 32 | { |
| 33 | - return 0 === count(array_filter($this->cells, static fn (Cell $cell): bool => null !== $cell->letter())); |
|
| 33 | + return 0 === count(array_filter($this->cells, static fn(Cell $cell): bool => null !== $cell->letter())); |
|
| 34 | 34 | } |
| 35 | 35 | |
| 36 | 36 | public function shiftCell(Coordinate $coordinate): Cell |
@@ -72,6 +72,6 @@ |
||
| 72 | 72 | */ |
| 73 | 73 | public function jsonSerialize(): array |
| 74 | 74 | { |
| 75 | - return array_map(static fn (Cell $cell): array => $cell->jsonSerialize(), $this->getIterator()->getArrayCopy()); |
|
| 75 | + return array_map(static fn(Cell $cell): array => $cell->jsonSerialize(), $this->getIterator()->getArrayCopy()); |
|
| 76 | 76 | } |
| 77 | 77 | } |
@@ -31,6 +31,6 @@ |
||
| 31 | 31 | */ |
| 32 | 32 | public function jsonSerialize(): array |
| 33 | 33 | { |
| 34 | - return array_map(static fn (LineDto $line): array => $line->jsonSerialize(), $this->lines); |
|
| 34 | + return array_map(static fn(LineDto $line): array => $line->jsonSerialize(), $this->lines); |
|
| 35 | 35 | } |
| 36 | 36 | } |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | */ |
| 40 | 40 | public function getItems(array $keys = []): array |
| 41 | 41 | { |
| 42 | - return array_map(static fn (string $key): CacheItemInterface => $this->getItem($key), $keys); |
|
| 42 | + return array_map(static fn(string $key): CacheItemInterface => $this->getItem($key), $keys); |
|
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | public function hasItem(string $key): bool |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | |
| 60 | 60 | public function deleteItems(array $keys): bool |
| 61 | 61 | { |
| 62 | - array_map(static fn (string $key): bool => $this->deleteItem($key), $keys); |
|
| 62 | + array_map(static fn(string $key): bool => $this->deleteItem($key), $keys); |
|
| 63 | 63 | |
| 64 | 64 | return true; |
| 65 | 65 | } |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | |
| 79 | 79 | public function commit(): bool |
| 80 | 80 | { |
| 81 | - array_map(static fn (CacheItemInterface $item): bool => $this->save($item), $this->deferred); |
|
| 81 | + array_map(static fn(CacheItemInterface $item): bool => $this->save($item), $this->deferred); |
|
| 82 | 82 | |
| 83 | 83 | return true; |
| 84 | 84 | } |
@@ -18,7 +18,7 @@ discard block |
||
| 18 | 18 | |
| 19 | 19 | public function getItems(array $keys = []): array |
| 20 | 20 | { |
| 21 | - return array_map(static fn (string $key): CacheItemInterface => $this->getItem($key), $keys); |
|
| 21 | + return array_map(static fn(string $key): CacheItemInterface => $this->getItem($key), $keys); |
|
| 22 | 22 | } |
| 23 | 23 | |
| 24 | 24 | public function hasItem(string $key): bool |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | |
| 45 | 45 | public function deleteItems(array $keys): bool |
| 46 | 46 | { |
| 47 | - array_map(static fn (string $key): bool => $this->deleteItem($key), $keys); |
|
| 47 | + array_map(static fn(string $key): bool => $this->deleteItem($key), $keys); |
|
| 48 | 48 | |
| 49 | 49 | return true; |
| 50 | 50 | } |
@@ -16,7 +16,7 @@ |
||
| 16 | 16 | foreach ($answers as $item) { |
| 17 | 17 | if (self::compareAnswers($item['l'], $item['v'])) { |
| 18 | 18 | $correct = array_map( |
| 19 | - static fn (array $item): string => strtolower(implode('', $item['l'])), |
|
| 19 | + static fn(array $item): string => strtolower(implode('', $item['l'])), |
|
| 20 | 20 | $answers |
| 21 | 21 | ); |
| 22 | 22 | |