@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -$loader = require __DIR__ . '/vendor/autoload.php'; |
|
2 | +$loader = require __DIR__.'/vendor/autoload.php'; |
|
3 | 3 | |
4 | 4 | \Doctrine\Common\Annotations\AnnotationRegistry::registerLoader(array($loader, 'loadClass')); |
5 | 5 |
@@ -30,13 +30,13 @@ discard block |
||
30 | 30 | } |
31 | 31 | |
32 | 32 | /** |
33 | - * @param RestRequestContract $request |
|
34 | - * |
|
35 | - * @return RestResponse |
|
36 | - */ |
|
37 | - public function handle($request) |
|
38 | - { |
|
39 | - $entity = $this->repository()->findById($request->getId()); |
|
33 | + * @param RestRequestContract $request |
|
34 | + * |
|
35 | + * @return RestResponse |
|
36 | + */ |
|
37 | + public function handle($request) |
|
38 | + { |
|
39 | + $entity = $this->repository()->findById($request->getId()); |
|
40 | 40 | |
41 | 41 | $this->authorize($request, $entity); |
42 | 42 | |
@@ -47,5 +47,5 @@ discard block |
||
47 | 47 | } |
48 | 48 | |
49 | 49 | return $this->response()->resource($request, new NullResource()); |
50 | - } |
|
50 | + } |
|
51 | 51 | } |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | */ |
107 | 107 | protected function getProperty(JsonApiResource $entity, $property) |
108 | 108 | { |
109 | - $getter = 'get' . ucfirst($property); |
|
109 | + $getter = 'get'.ucfirst($property); |
|
110 | 110 | |
111 | 111 | if (!method_exists($entity, $getter)) { |
112 | 112 | throw RestException::missingGetter($entity, $property, $getter); |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | */ |
126 | 126 | protected function setProperty(JsonApiResource $entity, $property, $value) |
127 | 127 | { |
128 | - $setter = 'set' . ucfirst($property); |
|
128 | + $setter = 'set'.ucfirst($property); |
|
129 | 129 | |
130 | 130 | if (!method_exists($entity, $setter)) { |
131 | 131 | throw RestException::missingSetter($entity, $property, $setter); |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | */ |
145 | 145 | protected function addRelationItem(JsonApiResource $entity, $field, $item) |
146 | 146 | { |
147 | - $adder = 'add' . ucfirst($field); |
|
147 | + $adder = 'add'.ucfirst($field); |
|
148 | 148 | |
149 | 149 | if (!method_exists($entity, $adder)) { |
150 | 150 | throw RestException::missingAdder($entity, $field, $adder); |
@@ -163,7 +163,7 @@ discard block |
||
163 | 163 | */ |
164 | 164 | protected function removeRelationItem(JsonApiResource $entity, $field, $item) |
165 | 165 | { |
166 | - $remover = 'remove' . ucfirst($field); |
|
166 | + $remover = 'remove'.ucfirst($field); |
|
167 | 167 | |
168 | 168 | if (!method_exists($entity, $remover)) { |
169 | 169 | throw RestException::missingRemover($entity, $field, $remover); |