@@ -24,7 +24,7 @@ |
||
| 24 | 24 | */ |
| 25 | 25 | public function register() |
| 26 | 26 | { |
| 27 | - $this->app->singleton('odataquery', function ($app) { |
|
| 27 | + $this->app->singleton('odataquery', function($app) { |
|
| 28 | 28 | return new LaravelQuery(); |
| 29 | 29 | }); |
| 30 | 30 | } |
@@ -66,7 +66,7 @@ |
||
| 66 | 66 | */ |
| 67 | 67 | public function setResourceType(ResourceType $resourceType) |
| 68 | 68 | { |
| 69 | - $this->iteratorName = "$" . $resourceType->getName(); |
|
| 69 | + $this->iteratorName = "$".$resourceType->getName(); |
|
| 70 | 70 | $this->resourceType = $resourceType; |
| 71 | 71 | } |
| 72 | 72 | /** |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | foreach ($lock as $barrel => $roll) { |
| 62 | 62 | assert( |
| 63 | 63 | !array_key_exists($barrel, $metamix[$key]), |
| 64 | - 'Mapping already defined for model '.$key. ' and CRUD verb '.$barrel |
|
| 64 | + 'Mapping already defined for model '.$key.' and CRUD verb '.$barrel |
|
| 65 | 65 | ); |
| 66 | 66 | $metamix[$key][$barrel] = $roll; |
| 67 | 67 | } |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | */ |
| 81 | 81 | public function register() |
| 82 | 82 | { |
| 83 | - $this->app->singleton('metadataControllers', function ($app) { |
|
| 83 | + $this->app->singleton('metadataControllers', function($app) { |
|
| 84 | 84 | return new MetadataControllerContainer(); |
| 85 | 85 | }); |
| 86 | 86 | } |
@@ -48,23 +48,23 @@ discard block |
||
| 48 | 48 | } |
| 49 | 49 | |
| 50 | 50 | if (!array_key_exists($crudVerb, $lookup)) { |
| 51 | - throw new \Exception('Metadata mapping for CRUD verb '. $crudVerb.' on model '.$modelName.' not defined'); |
|
| 51 | + throw new \Exception('Metadata mapping for CRUD verb '.$crudVerb.' on model '.$modelName.' not defined'); |
|
| 52 | 52 | } |
| 53 | 53 | $result = $lookup[$crudVerb]; |
| 54 | 54 | if (!isset($result)) { |
| 55 | - throw new \Exception('Metadata mapping for CRUD verb '. $crudVerb.' on model '.$modelName.' null'); |
|
| 55 | + throw new \Exception('Metadata mapping for CRUD verb '.$crudVerb.' on model '.$modelName.' null'); |
|
| 56 | 56 | } |
| 57 | 57 | |
| 58 | 58 | if (!method_exists($this, $result)) { |
| 59 | 59 | throw new \Exception( |
| 60 | - 'Metadata target for CRUD verb '. $crudVerb.' on model '.$modelName.' does not exist' |
|
| 60 | + 'Metadata target for CRUD verb '.$crudVerb.' on model '.$modelName.' does not exist' |
|
| 61 | 61 | ); |
| 62 | 62 | } |
| 63 | 63 | |
| 64 | 64 | $class = get_class($this); |
| 65 | 65 | $parmArray = $this->getParameterNames($result); |
| 66 | 66 | |
| 67 | - return [ 'method' => $result, 'controller' => $class, 'parameters' => $parmArray]; |
|
| 67 | + return ['method' => $result, 'controller' => $class, 'parameters' => $parmArray]; |
|
| 68 | 68 | } |
| 69 | 69 | |
| 70 | 70 | public function getMappings() |
@@ -86,12 +86,12 @@ discard block |
||
| 86 | 86 | throw new \Exception('CRUD verb '.$verb.' not defined'); |
| 87 | 87 | } |
| 88 | 88 | if (!isset($method)) { |
| 89 | - throw new \Exception('Metadata mapping for CRUD verb '. $verb.' on model '.$key.' null'); |
|
| 89 | + throw new \Exception('Metadata mapping for CRUD verb '.$verb.' on model '.$key.' null'); |
|
| 90 | 90 | } |
| 91 | 91 | |
| 92 | 92 | if (!method_exists($this, $method)) { |
| 93 | 93 | throw new \Exception( |
| 94 | - 'Metadata target for CRUD verb '. $verb.' on model '.$key.' does not exist' |
|
| 94 | + 'Metadata target for CRUD verb '.$verb.' on model '.$key.' does not exist' |
|
| 95 | 95 | ); |
| 96 | 96 | } |
| 97 | 97 | $parmArray = $this->getParameterNames($method); |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | } |
| 101 | 101 | |
| 102 | 102 | $class = get_class($this); |
| 103 | - $allMappings[$key][$verb] = [ 'method' => $method, 'controller' => $class, 'parameters' => $parmArray]; |
|
| 103 | + $allMappings[$key][$verb] = ['method' => $method, 'controller' => $class, 'parameters' => $parmArray]; |
|
| 104 | 104 | } |
| 105 | 105 | } |
| 106 | 106 | return $allMappings; |
@@ -373,12 +373,12 @@ discard block |
||
| 373 | 373 | $map = $raw->getMetadata(); |
| 374 | 374 | |
| 375 | 375 | if (!array_key_exists($class, $map)) { |
| 376 | - throw new \POData\Common\InvalidOperationException('Controller mapping missing for class ' . $class); |
|
| 376 | + throw new \POData\Common\InvalidOperationException('Controller mapping missing for class '.$class); |
|
| 377 | 377 | } |
| 378 | 378 | $goal = $raw->getMapping($class, $verb); |
| 379 | 379 | if (null == $goal) { |
| 380 | 380 | throw new \POData\Common\InvalidOperationException( |
| 381 | - 'Controller mapping missing for ' . $verb . ' verb on class ' . $class |
|
| 381 | + 'Controller mapping missing for '.$verb.' verb on class '.$class |
|
| 382 | 382 | ); |
| 383 | 383 | } |
| 384 | 384 | |
@@ -386,7 +386,7 @@ discard block |
||
| 386 | 386 | $data = []; |
| 387 | 387 | } |
| 388 | 388 | if (is_object($data)) { |
| 389 | - $data = (array)$data; |
|
| 389 | + $data = (array) $data; |
|
| 390 | 390 | } |
| 391 | 391 | if (!is_array($data)) { |
| 392 | 392 | throw \POData\Common\ODataException::createPreConditionFailedError( |