@@ -109,11 +109,11 @@ |
||
| 109 | 109 | { |
| 110 | 110 | $name = $link->getName(); |
| 111 | 111 | |
| 112 | - if (isset($this->documentLinks[$name])) { |
|
| 112 | + if (isset($this->documentLinks[ $name ])) { |
|
| 113 | 113 | throw new \LogicException(sprintf('Link "%s" already added to document.')); |
| 114 | 114 | } |
| 115 | 115 | |
| 116 | - $this->documentLinks[$name] = $link; |
|
| 116 | + $this->documentLinks[ $name ] = $link; |
|
| 117 | 117 | } |
| 118 | 118 | |
| 119 | 119 | /** |
@@ -42,14 +42,14 @@ discard block |
||
| 42 | 42 | * |
| 43 | 43 | * @var ObjectHandlerInterface[] |
| 44 | 44 | */ |
| 45 | - protected $objectHandlers = []; |
|
| 45 | + protected $objectHandlers = [ ]; |
|
| 46 | 46 | |
| 47 | 47 | /** |
| 48 | 48 | * Object-handlers resolved by supported class |
| 49 | 49 | * |
| 50 | 50 | * @var ObjectHandlerInterface[] |
| 51 | 51 | */ |
| 52 | - protected $resolvedObjectHandlers = []; |
|
| 52 | + protected $resolvedObjectHandlers = [ ]; |
|
| 53 | 53 | |
| 54 | 54 | /** |
| 55 | 55 | * JsonApiViewListener constructor. |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | */ |
| 69 | 69 | public function addObjectHandler(ObjectHandlerInterface $handler) |
| 70 | 70 | { |
| 71 | - $this->objectHandlers[] = $handler; |
|
| 71 | + $this->objectHandlers[ ] = $handler; |
|
| 72 | 72 | } |
| 73 | 73 | |
| 74 | 74 | /** |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | { |
| 81 | 81 | $result = $event->getControllerResult(); |
| 82 | 82 | |
| 83 | - if (! is_object($result)) { |
|
| 83 | + if (!is_object($result)) { |
|
| 84 | 84 | return; |
| 85 | 85 | } |
| 86 | 86 | |
@@ -308,13 +308,13 @@ discard block |
||
| 308 | 308 | */ |
| 309 | 309 | protected function getHandler(string $class): ObjectHandlerInterface |
| 310 | 310 | { |
| 311 | - if (isset($this->resolvedObjectHandlers[$class])) { |
|
| 312 | - return $this->resolvedObjectHandlers[$class]; |
|
| 311 | + if (isset($this->resolvedObjectHandlers[ $class ])) { |
|
| 312 | + return $this->resolvedObjectHandlers[ $class ]; |
|
| 313 | 313 | } |
| 314 | 314 | |
| 315 | 315 | foreach ($this->objectHandlers as $handler) { |
| 316 | 316 | if ($handler->supports($class)) { |
| 317 | - $this->resolvedObjectHandlers[$class] = $handler; |
|
| 317 | + $this->resolvedObjectHandlers[ $class ] = $handler; |
|
| 318 | 318 | return $handler; |
| 319 | 319 | } |
| 320 | 320 | } |