@@ -41,7 +41,7 @@ |
||
| 41 | 41 | */ |
| 42 | 42 | public function diffKeys(array $keys): Sequence |
| 43 | 43 | { |
| 44 | - $filtered = array_filter($this->getData()->keys(), fn ($key) => !in_array($key, $keys)); |
|
| 44 | + $filtered = array_filter($this->getData()->keys(), fn($key) => !in_array($key, $keys)); |
|
| 45 | 45 | |
| 46 | 46 | return new Sequence($filtered); |
| 47 | 47 | } |
@@ -34,7 +34,7 @@ |
||
| 34 | 34 | { |
| 35 | 35 | $operationsJson = $this->parseJson($this->adapter->getRequestBody()); |
| 36 | 36 | $operations = $this->toSequence($operationsJson); |
| 37 | - $operationsWithoutOpKey = $operations->filterNot(fn ($operationData) => array_key_exists(self::OP_KEY_NAME, $operationData)); |
|
| 37 | + $operationsWithoutOpKey = $operations->filterNot(fn($operationData) => array_key_exists(self::OP_KEY_NAME, $operationData)); |
|
| 38 | 38 | |
| 39 | 39 | if (!$operationsWithoutOpKey->isEmpty()) { |
| 40 | 40 | /** @var array $operationData */ |
@@ -53,8 +53,8 @@ discard block |
||
| 53 | 53 | ->all() |
| 54 | 54 | ->foldLeft( |
| 55 | 55 | new Sequence(), |
| 56 | - function (Sequence $matchedOperations, array $operationData) use ($handlers, $subject) { |
|
| 57 | - $handler = $handlers->find(fn (PatchOperationHandler $patchHandler) => $operationData[Operations::OP_KEY_NAME] === $patchHandler->getName()); |
|
| 56 | + function(Sequence $matchedOperations, array $operationData) use ($handlers, $subject) { |
|
| 57 | + $handler = $handlers->find(fn(PatchOperationHandler $patchHandler) => $operationData[Operations::OP_KEY_NAME] === $patchHandler->getName()); |
|
| 58 | 58 | if ($handler->isDefined()) { |
| 59 | 59 | /** @var PatchOperationHandler $patchOperationHandler */ |
| 60 | 60 | $patchOperationHandler = $handler->get(); |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | { |
| 80 | 80 | return $this->operations |
| 81 | 81 | ->all() |
| 82 | - ->filter(fn (array $operationData) => $operationData !== $this->getMatchedOperations($subject)) |
|
| 83 | - ->map(fn (array $operationData) => $operationData['op']); |
|
| 82 | + ->filter(fn(array $operationData) => $operationData !== $this->getMatchedOperations($subject)) |
|
| 83 | + ->map(fn(array $operationData) => $operationData['op']); |
|
| 84 | 84 | } |
| 85 | 85 | } |
@@ -36,7 +36,7 @@ |
||
| 36 | 36 | ->scalarNode('alias') |
| 37 | 37 | ->defaultNull() |
| 38 | 38 | ->validate() |
| 39 | - ->ifTrue(fn ($value) => 0 === preg_match('#^[a-zA-Z0-9_]+$#', $value)) |
|
| 39 | + ->ifTrue(fn($value) => 0 === preg_match('#^[a-zA-Z0-9_]+$#', $value)) |
|
| 40 | 40 | ->thenInvalid('Alias should be a string containing letters and underscore. "%s" given') |
| 41 | 41 | ->end() |
| 42 | 42 | ->end() |