@@ -42,7 +42,7 @@ |
||
| 42 | 42 | */ |
| 43 | 43 | protected function setErrorHandler(): self |
| 44 | 44 | { |
| 45 | - set_error_handler(function ($severity, $message, $file, $line) { |
|
| 45 | + set_error_handler(function($severity, $message, $file, $line) { |
|
| 46 | 46 | $log = $message.' in '.$file.':'.$line; |
| 47 | 47 | |
| 48 | 48 | switch ($severity) { |
@@ -184,7 +184,7 @@ |
||
| 184 | 184 | */ |
| 185 | 185 | protected function setExceptionHandler(): self |
| 186 | 186 | { |
| 187 | - set_exception_handler(function ($e) { |
|
| 187 | + set_exception_handler(function($e) { |
|
| 188 | 188 | $this->logger->emergency('uncaught exception: '.$e->getMessage(), [ |
| 189 | 189 | 'category' => get_class($this), |
| 190 | 190 | 'exception' => $e, |
@@ -51,7 +51,7 @@ |
||
| 51 | 51 | */ |
| 52 | 52 | protected static function setErrorHandler(LoggerInterface $logger): void |
| 53 | 53 | { |
| 54 | - set_error_handler(function ($severity, $message, $file, $line) use ($logger) { |
|
| 54 | + set_error_handler(function($severity, $message, $file, $line) use ($logger) { |
|
| 55 | 55 | $log = $message.' in '.$file.':'.$line; |
| 56 | 56 | |
| 57 | 57 | switch ($severity) { |
@@ -54,7 +54,7 @@ |
||
| 54 | 54 | */ |
| 55 | 55 | protected function setErrorHandler(LoggerInterface $logger): self |
| 56 | 56 | { |
| 57 | - set_error_handler(function ($severity, $message, $file, $line) use ($logger) { |
|
| 57 | + set_error_handler(function($severity, $message, $file, $line) use ($logger) { |
|
| 58 | 58 | $log = $message.' in '.$file.':'.$line; |
| 59 | 59 | |
| 60 | 60 | switch ($severity) { |
@@ -100,7 +100,7 @@ |
||
| 100 | 100 | if ($handler instanceof MongoDBHandler) { |
| 101 | 101 | $handler->setLevel($level); |
| 102 | 102 | |
| 103 | - $this->logger->pushProcessor(function ($record) use ($context) { |
|
| 103 | + $this->logger->pushProcessor(function($record) use ($context) { |
|
| 104 | 104 | $record['context'] = array_merge($record['context'], $context); |
| 105 | 105 | |
| 106 | 106 | return $record; |
@@ -20,7 +20,7 @@ |
||
| 20 | 20 | */ |
| 21 | 21 | public static function collect() |
| 22 | 22 | { |
| 23 | - return FastRoute\simpleDispatcher(function (FastRoute\RouteCollector $r) { |
|
| 23 | + return FastRoute\simpleDispatcher(function(FastRoute\RouteCollector $r) { |
|
| 24 | 24 | $r->addRoute('GET', '/api/v1', [v1\Api::class, 'get']); |
| 25 | 25 | $r->addRoute('GET', '/spec/api/v1', [Specifications::class, 'getApiv1']); |
| 26 | 26 | $r->addRoute('GET', '/api/v1/namespaces', [v1\ResourceNamespaces::class, 'getAll']); |
@@ -63,7 +63,7 @@ |
||
| 63 | 63 | 'namespace' => $namespace, |
| 64 | 64 | 'collection' => $collection, |
| 65 | 65 | 'data' => $this->getData(), |
| 66 | - 'status' => function ($object) { |
|
| 66 | + 'status' => function($object) { |
|
| 67 | 67 | $endpoints = $object->getEndpoints(); |
| 68 | 68 | foreach ($endpoints as &$endpoint) { |
| 69 | 69 | $endpoint['last_sync'] = $endpoint['last_sync']->toDateTime()->format('c'); |
@@ -46,5 +46,5 @@ |
||
| 46 | 46 | /** |
| 47 | 47 | * Switch namespace. |
| 48 | 48 | */ |
| 49 | - public function switch(string $name): ResourceNamespaceInterface; |
|
| 49 | + public function switch (string $name): ResourceNamespaceInterface; |
|
| 50 | 50 | } |
@@ -109,7 +109,7 @@ |
||
| 109 | 109 | /** |
| 110 | 110 | * {@inheritdoc} |
| 111 | 111 | */ |
| 112 | - public function switch(string $name): ResourceNamespaceInterface |
|
| 112 | + public function switch (string $name): ResourceNamespaceInterface |
|
| 113 | 113 | { |
| 114 | 114 | return $this->namespace_factory->getOne($name); |
| 115 | 115 | } |