@@ -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, |
@@ -50,9 +50,9 @@ discard block |
||
50 | 50 | */ |
51 | 51 | protected function utf16(): ExpressionFunction |
52 | 52 | { |
53 | - return new ExpressionFunction('utf16', function ($str) { |
|
53 | + return new ExpressionFunction('utf16', function($str) { |
|
54 | 54 | return sprintf('$len = strlen(%1$s); $new=""; for ($i = 0; $i < $len; ++$i) {$new .= "{$string[$i]}\000";}', $str); |
55 | - }, function ($arguments, $str) { |
|
55 | + }, function($arguments, $str) { |
|
56 | 56 | $len = strlen($str); |
57 | 57 | $new = ''; |
58 | 58 | |
@@ -71,9 +71,9 @@ discard block |
||
71 | 71 | */ |
72 | 72 | protected function uuidv4(): ExpressionFunction |
73 | 73 | { |
74 | - return new ExpressionFunction('uuidv4', function () { |
|
74 | + return new ExpressionFunction('uuidv4', function() { |
|
75 | 75 | return ''; |
76 | - }, function () { |
|
76 | + }, function() { |
|
77 | 77 | return sprintf( |
78 | 78 | '%04x%04x-%04x-%04x-%04x-%04x%04x%04x', |
79 | 79 | // 32 bits for "time_low" |
@@ -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; |
@@ -69,7 +69,7 @@ |
||
69 | 69 | $query = $request->getQueryParams(); |
70 | 70 | $options = isset($query['pretty']) ? JSON_PRETTY_PRINT : 0; |
71 | 71 | |
72 | - $stream = new StreamIterator($cursor, function ($event) use ($request, $options) { |
|
72 | + $stream = new StreamIterator($cursor, function($event) use ($request, $options) { |
|
73 | 73 | if ($this->tell() === 0) { |
74 | 74 | echo '['; |
75 | 75 | } else { |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | ]; |
75 | 75 | } |
76 | 76 | |
77 | - return $this->getAllFrom($this->db->{self::COLLECTION_NAME}, $filter, $offset, $limit, $sort, function (array $resource) use ($endpoint) { |
|
77 | + return $this->getAllFrom($this->db->{self::COLLECTION_NAME}, $filter, $offset, $limit, $sort, function(array $resource) use ($endpoint) { |
|
78 | 78 | return $this->build($resource, $endpoint); |
79 | 79 | }); |
80 | 80 | } |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | */ |
143 | 143 | public function watch(EndpointInterface $endpoint, ?ObjectIdInterface $after = null, bool $existing = true, ?array $query = null, ?int $offset = null, ?int $limit = null, ?array $sort = null): Generator |
144 | 144 | { |
145 | - return $this->watchFrom($this->db->{self::COLLECTION_NAME}, $after, $existing, $query, function (array $resource) use ($endpoint) { |
|
145 | + return $this->watchFrom($this->db->{self::COLLECTION_NAME}, $after, $existing, $query, function(array $resource) use ($endpoint) { |
|
146 | 146 | return $this->build($resource, $endpoint); |
147 | 147 | }, $offset, $limit, $sort); |
148 | 148 | } |
@@ -48,12 +48,12 @@ |
||
48 | 48 | 'message' => $this->resource['message'], |
49 | 49 | 'created' => (new DateTime($this->resource['datetime']))->format('c'), |
50 | 50 | 'category' => $this->resource['context']['category'], |
51 | - 'exception' => function ($resource) use ($data) { |
|
51 | + 'exception' => function($resource) use ($data) { |
|
52 | 52 | if (isset($data['context']['exception'])) { |
53 | 53 | return $data['context']['exception']; |
54 | 54 | } |
55 | 55 | }, |
56 | - 'object' => function ($resource) use ($data) { |
|
56 | + 'object' => function($resource) use ($data) { |
|
57 | 57 | if (isset($data['context']['object'])) { |
58 | 58 | return $data['context']['object']; |
59 | 59 | } |