@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | $step->setPreviousResponse($response); |
42 | 42 | $response = $step->execute(); |
43 | 43 | |
44 | - if(!$response) { |
|
44 | + if (!$response) { |
|
45 | 45 | throw new ProcessingException( |
46 | 46 | sprintf('RequestProcessor didn\'t receive any response from %s', get_class($step))); |
47 | 47 | } |
@@ -59,8 +59,8 @@ discard block |
||
59 | 59 | foreach ($step->requiresBefore() as $requiredStep) { |
60 | 60 | if (!in_array($requiredStep, $this->executedSteps)) { |
61 | 61 | throw new ProcessingException(sprintf( |
62 | - "Request didn't pass required steps yet. Try to adjust your processing strategy\n" . |
|
63 | - "Required steps for %s are: %s", $step->getName(), implode(',', $step->requiresBefore()) |
|
62 | + "Request didn't pass required steps yet. Try to adjust your processing strategy\n". |
|
63 | + "Required steps for %s are: %s", $step->getName(), implode(',', $step->requiresBefore()) |
|
64 | 64 | )); |
65 | 65 | } |
66 | 66 | } |
@@ -25,7 +25,7 @@ |
||
25 | 25 | $queryBuilder = $this->getFromResponse('query_builder'); |
26 | 26 | $sort = $this->request->get('sort', $this->request->attributes->get('_sort')); |
27 | 27 | $direction = $this->request->get('direction', $this->request->attributes->get('_sort_direction')); |
28 | - if(!in_array($direction, ['asc', 'desc'])) { |
|
28 | + if (!in_array($direction, ['asc', 'desc'])) { |
|
29 | 29 | throw new BadRequestHttpException(); |
30 | 30 | } |
31 | 31 | /** @var \ReflectionClass $reflection */ |
@@ -29,7 +29,7 @@ |
||
29 | 29 | |
30 | 30 | foreach ($filters as $filter) { |
31 | 31 | $property = $reflection->getProperty($filter['property']); |
32 | - if(!$this->accessManager->canAccessProperty($property)) { |
|
32 | + if (!$this->accessManager->canAccessProperty($property)) { |
|
33 | 33 | throw new AccessDeniedHttpException(); |
34 | 34 | } |
35 | 35 | call_user_func([$this, sprintf('apply%sFilter', $filter['type'])], $filter, $queryBuilder); |
@@ -122,10 +122,10 @@ |
||
122 | 122 | { |
123 | 123 | foreach ($required as $param) { |
124 | 124 | if (!array_key_exists($param, $filter)) { |
125 | - throw new BadRequestHttpException(sprintf( |
|
126 | - 'Filter doesn\'t contain required params. Required params are %s', |
|
127 | - implode(', ', $required) |
|
128 | - )); |
|
125 | + throw new BadRequestHttpException(sprintf( |
|
126 | + 'Filter doesn\'t contain required params. Required params are %s', |
|
127 | + implode(', ', $required) |
|
128 | + )); |
|
129 | 129 | } |
130 | 130 | } |
131 | 131 | } |
@@ -32,7 +32,7 @@ |
||
32 | 32 | { |
33 | 33 | if ($filter = $request->get('filter')) { |
34 | 34 | $filters = json_decode(base64_decode($filter), true); |
35 | - if($filters) { |
|
35 | + if ($filters) { |
|
36 | 36 | $this->filters = $filters; |
37 | 37 | $this->validate(); |
38 | 38 | } |
@@ -197,7 +197,7 @@ |
||
197 | 197 | |
198 | 198 | foreach ($reflection->getProperties() as $property) { |
199 | 199 | $anonymousAccess = $this->reader->getPropertyAnnotation($property, AnonymousAccess::class); |
200 | - $access = $this->reader->getPropertyAnnotation($property,Access::class); |
|
200 | + $access = $this->reader->getPropertyAnnotation($property, Access::class); |
|
201 | 201 | if ($anonymousAccess || $access) { |
202 | 202 | $param = ['name' => $property->getName()]; |
203 | 203 | $param['access'] = $anonymousAccess ? ['Any'] : []; |
@@ -84,8 +84,8 @@ |
||
84 | 84 | protected function isRelation(\ReflectionProperty $property) |
85 | 85 | { |
86 | 86 | return ( |
87 | - $this->reader->getPropertyAnnotation($property, Relation::class) || |
|
88 | - $this->reader->getPropertyAnnotation($property, OneToOne::class) || |
|
87 | + $this->reader->getPropertyAnnotation($property, Relation::class) || |
|
88 | + $this->reader->getPropertyAnnotation($property, OneToOne::class) || |
|
89 | 89 | $this->reader->getPropertyAnnotation($property, OneToMany::class) || |
90 | 90 | $this->reader->getPropertyAnnotation($property, ManyToOne::class) || |
91 | 91 | $this->reader->getPropertyAnnotation($property, ManyToMany::class) |