@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | { |
102 | 102 | $that = $this; |
103 | 103 | |
104 | - return $this->resource_factory->getAllFrom($this->db->{self::COLLECTION_NAME}, $query, $offset, $limit, $sort, function (array $resource) use ($that) { |
|
104 | + return $this->resource_factory->getAllFrom($this->db->{self::COLLECTION_NAME}, $query, $offset, $limit, $sort, function(array $resource) use ($that) { |
|
105 | 105 | return $that->build($resource); |
106 | 106 | }); |
107 | 107 | } |
@@ -173,7 +173,7 @@ discard block |
||
173 | 173 | { |
174 | 174 | $that = $this; |
175 | 175 | |
176 | - return $this->resource_factory->watchFrom($this->db->{self::COLLECTION_NAME}, $after, $existing, $query, function (array $resource) use ($that) { |
|
176 | + return $this->resource_factory->watchFrom($this->db->{self::COLLECTION_NAME}, $after, $existing, $query, function(array $resource) use ($that) { |
|
177 | 177 | return $that->build($resource); |
178 | 178 | }, $offset, $limit, $sort); |
179 | 179 | } |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | { |
63 | 63 | $that = $this; |
64 | 64 | |
65 | - return $this->resource_factory->getAllFrom($this->db->{self::COLLECTION_NAME}, $query, $offset, $limit, $sort, function ($resource) use ($that) { |
|
65 | + return $this->resource_factory->getAllFrom($this->db->{self::COLLECTION_NAME}, $query, $offset, $limit, $sort, function($resource) use ($that) { |
|
66 | 66 | return $that->build($resource); |
67 | 67 | }); |
68 | 68 | } |
@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | { |
131 | 131 | $that = $this; |
132 | 132 | |
133 | - return $this->resource_factory->watchFrom($this->db->{self::COLLECTION_NAME}, $after, $existing, $query, function ($resource) use ($that) { |
|
133 | + return $this->resource_factory->watchFrom($this->db->{self::COLLECTION_NAME}, $after, $existing, $query, function($resource) use ($that) { |
|
134 | 134 | return $that->build($resource); |
135 | 135 | }, $offset, $limit, $sort); |
136 | 136 | } |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | $filter = $this->prepareQuery($namespace, $query); |
94 | 94 | $that = $this; |
95 | 95 | |
96 | - return $this->resource_factory->getAllFrom($this->db->{self::COLLECTION_NAME}, $filter, $offset, $limit, $sort, function (array $resource) use ($namespace, $that) { |
|
96 | + return $this->resource_factory->getAllFrom($this->db->{self::COLLECTION_NAME}, $filter, $offset, $limit, $sort, function(array $resource) use ($namespace, $that) { |
|
97 | 97 | return $that->build($resource, $namespace); |
98 | 98 | }); |
99 | 99 | } |
@@ -230,7 +230,7 @@ discard block |
||
230 | 230 | $filter = $this->prepareQuery($namespace, $query); |
231 | 231 | $that = $this; |
232 | 232 | |
233 | - return $this->resource_factory->watchFrom($this->db->{self::COLLECTION_NAME}, $after, $existing, $filter, function (array $resource) use ($namespace, $that) { |
|
233 | + return $this->resource_factory->watchFrom($this->db->{self::COLLECTION_NAME}, $after, $existing, $filter, function(array $resource) use ($namespace, $that) { |
|
234 | 234 | return $that->build($resource, $namespace); |
235 | 235 | }, $offset, $limit, $sort); |
236 | 236 | } |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | $filter = $this->prepareQuery($collection, $query); |
97 | 97 | $that = $this; |
98 | 98 | |
99 | - return $this->resource_factory->getAllFrom($this->db->{self::COLLECTION_NAME}, $filter, $offset, $limit, $sort, function (array $resource) use ($collection, $that) { |
|
99 | + return $this->resource_factory->getAllFrom($this->db->{self::COLLECTION_NAME}, $filter, $offset, $limit, $sort, function(array $resource) use ($collection, $that) { |
|
100 | 100 | return $that->build($resource, $collection); |
101 | 101 | }); |
102 | 102 | } |
@@ -212,7 +212,7 @@ discard block |
||
212 | 212 | $filter = $this->prepareQuery($collection, $query); |
213 | 213 | $that = $this; |
214 | 214 | |
215 | - return $this->resource_factory->watchFrom($this->db->{self::COLLECTION_NAME}, $after, $existing, $filter, function (array $resource) use ($collection, $that) { |
|
215 | + return $this->resource_factory->watchFrom($this->db->{self::COLLECTION_NAME}, $after, $existing, $filter, function(array $resource) use ($collection, $that) { |
|
216 | 216 | return $that->build($resource, $collection); |
217 | 217 | }, $offset, $limit, $sort); |
218 | 218 | } |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | $filter = $this->prepareQuery($namespace, $query); |
73 | 73 | $that = $this; |
74 | 74 | |
75 | - return $this->resource_factory->getAllFrom($this->db->{$this->scheduler->getJobQueue()}, $filter, $offset, $limit, $sort, function (array $resource) use ($namespace, $that) { |
|
75 | + return $this->resource_factory->getAllFrom($this->db->{$this->scheduler->getJobQueue()}, $filter, $offset, $limit, $sort, function(array $resource) use ($namespace, $that) { |
|
76 | 76 | return $that->build($resource, $namespace); |
77 | 77 | }); |
78 | 78 | } |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | $filter = $this->prepareQuery($namespace, $query); |
132 | 132 | $that = $this; |
133 | 133 | |
134 | - return $this->resource_factory->watchFrom($this->db->{$this->scheduler->getJobQueue()}, $after, $existing, $filter, function (array $resource) use ($namespace, $that) { |
|
134 | + return $this->resource_factory->watchFrom($this->db->{$this->scheduler->getJobQueue()}, $after, $existing, $filter, function(array $resource) use ($namespace, $that) { |
|
135 | 135 | return $that->build($resource, $namespace); |
136 | 136 | }, $offset, $limit, $sort); |
137 | 137 | } |
@@ -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\Api::class, 'get']); |
25 | 25 | $r->addRoute('GET', '/api/v1', [v1\Api::class, 'get']); |
26 | 26 | $r->addRoute('GET', '/spec/api/v1', [Specifications::class, 'getApiv1']); |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | { |
63 | 63 | $that = $this; |
64 | 64 | |
65 | - return $this->resource_factory->getAllFrom($this->db->{self::COLLECTION_NAME}, $query, $offset, $limit, $sort, function ($resource) use ($that) { |
|
65 | + return $this->resource_factory->getAllFrom($this->db->{self::COLLECTION_NAME}, $query, $offset, $limit, $sort, function($resource) use ($that) { |
|
66 | 66 | return $that->build($resource); |
67 | 67 | }); |
68 | 68 | } |
@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | { |
131 | 131 | $that = $this; |
132 | 132 | |
133 | - return $this->resource_factory->watchFrom($this->db->{self::COLLECTION_NAME}, $after, $existing, $query, function ($resource) use ($that) { |
|
133 | + return $this->resource_factory->watchFrom($this->db->{self::COLLECTION_NAME}, $after, $existing, $query, function($resource) use ($that) { |
|
134 | 134 | return $that->build($resource); |
135 | 135 | }, $offset, $limit, $sort); |
136 | 136 | } |
@@ -155,7 +155,7 @@ discard block |
||
155 | 155 | $resource_factory = $this->resource_factory; |
156 | 156 | $db = $this->db; |
157 | 157 | |
158 | - return $this->resource_factory->getAllFrom($this->db->{self::COLLECTION_NAME}, $filter, $offset, $limit, $sort, function (array $resource) use ($object, $relation, $logger, $resource_factory, $db, $that) { |
|
158 | + return $this->resource_factory->getAllFrom($this->db->{self::COLLECTION_NAME}, $filter, $offset, $limit, $sort, function(array $resource) use ($object, $relation, $logger, $resource_factory, $db, $that) { |
|
159 | 159 | $object_1 = $resource['data']['relation'][0]; |
160 | 160 | $object_2 = $resource['data']['relation'][1]; |
161 | 161 | $related = $object_1; |
@@ -189,7 +189,7 @@ discard block |
||
189 | 189 | $filter = $this->prepareQuery($namespace, $query); |
190 | 190 | $that = $this; |
191 | 191 | |
192 | - return $this->resource_factory->getAllFrom($this->db->{self::COLLECTION_NAME}, $filter, $offset, $limit, $sort, function (array $resource) use ($that) { |
|
192 | + return $this->resource_factory->getAllFrom($this->db->{self::COLLECTION_NAME}, $filter, $offset, $limit, $sort, function(array $resource) use ($that) { |
|
193 | 193 | return $that->build($resource); |
194 | 194 | }); |
195 | 195 | } |
@@ -335,7 +335,7 @@ discard block |
||
335 | 335 | $filter = $this->prepareQuery($namespace, $query); |
336 | 336 | $that = $this; |
337 | 337 | |
338 | - return $this->resource_factory->watchFrom($this->db->{self::COLLECTION_NAME}, $after, $existing, $filter, function (array $resource) use ($that) { |
|
338 | + return $this->resource_factory->watchFrom($this->db->{self::COLLECTION_NAME}, $after, $existing, $filter, function(array $resource) use ($that) { |
|
339 | 339 | return $that->build($resource); |
340 | 340 | }, $offset, $limit, $sort); |
341 | 341 | } |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | { |
102 | 102 | $that = $this; |
103 | 103 | |
104 | - return $this->resource_factory->getAllFrom($this->db->{self::COLLECTION_NAME}, $query, $offset, $limit, $sort, function (array $resource) use ($that) { |
|
104 | + return $this->resource_factory->getAllFrom($this->db->{self::COLLECTION_NAME}, $query, $offset, $limit, $sort, function(array $resource) use ($that) { |
|
105 | 105 | return $that->build($resource); |
106 | 106 | }); |
107 | 107 | } |
@@ -173,7 +173,7 @@ discard block |
||
173 | 173 | { |
174 | 174 | $that = $this; |
175 | 175 | |
176 | - return $this->resource_factory->watchFrom($this->db->{self::COLLECTION_NAME}, $after, $existing, $query, function (array $resource) use ($that) { |
|
176 | + return $this->resource_factory->watchFrom($this->db->{self::COLLECTION_NAME}, $after, $existing, $query, function(array $resource) use ($that) { |
|
177 | 177 | return $that->build($resource); |
178 | 178 | }, $offset, $limit, $sort); |
179 | 179 | } |