@@ -35,27 +35,27 @@ discard block |
||
35 | 35 | assert(0 < count($this->mapping), 'Mapping array must not be empty'); |
36 | 36 | |
37 | 37 | if (!array_key_exists($modelName, $this->mapping)) { |
38 | - throw new \Exception('Metadata mapping for model '.$modelName.' not defined'); |
|
38 | + throw new \Exception('Metadata mapping for model ' . $modelName . ' not defined'); |
|
39 | 39 | } |
40 | 40 | |
41 | 41 | $this->checkCrudVerbDefined($crudVerb); |
42 | 42 | |
43 | 43 | $lookup = $this->mapping[$modelName]; |
44 | 44 | if (!is_array($lookup)) { |
45 | - throw new \Exception('Metadata mapping for model '.$modelName.' not an array'); |
|
45 | + throw new \Exception('Metadata mapping for model ' . $modelName . ' not an array'); |
|
46 | 46 | } |
47 | 47 | |
48 | 48 | if (!array_key_exists($crudVerb, $lookup)) { |
49 | - throw new \Exception('Metadata mapping for CRUD verb '.$crudVerb.' on model '.$modelName.' not defined'); |
|
49 | + throw new \Exception('Metadata mapping for CRUD verb ' . $crudVerb . ' on model ' . $modelName . ' not defined'); |
|
50 | 50 | } |
51 | 51 | $result = $lookup[$crudVerb]; |
52 | 52 | if (!isset($result)) { |
53 | - throw new \Exception('Metadata mapping for CRUD verb '.$crudVerb.' on model '.$modelName.' null'); |
|
53 | + throw new \Exception('Metadata mapping for CRUD verb ' . $crudVerb . ' on model ' . $modelName . ' null'); |
|
54 | 54 | } |
55 | 55 | |
56 | 56 | if (!method_exists($this, $result)) { |
57 | 57 | throw new \Exception( |
58 | - 'Metadata target for CRUD verb '.$crudVerb.' on model '.$modelName.' does not exist' |
|
58 | + 'Metadata target for CRUD verb ' . $crudVerb . ' on model ' . $modelName . ' does not exist' |
|
59 | 59 | ); |
60 | 60 | } |
61 | 61 | |
@@ -77,17 +77,17 @@ discard block |
||
77 | 77 | // check that mapping array is well formed and sane, rather than waiting to stab us with a spatula |
78 | 78 | foreach ($this->mapping as $key => $map) { |
79 | 79 | if (!is_array($map)) { |
80 | - throw new \Exception('Metadata mapping for model '.$key.' not an array'); |
|
80 | + throw new \Exception('Metadata mapping for model ' . $key . ' not an array'); |
|
81 | 81 | } |
82 | 82 | foreach ($map as $verb => $method) { |
83 | 83 | $this->checkCrudVerbDefined($verb); |
84 | 84 | if (!isset($method)) { |
85 | - throw new \Exception('Metadata mapping for CRUD verb '.$verb.' on model '.$key.' null'); |
|
85 | + throw new \Exception('Metadata mapping for CRUD verb ' . $verb . ' on model ' . $key . ' null'); |
|
86 | 86 | } |
87 | 87 | |
88 | 88 | if (!method_exists($this, $method)) { |
89 | 89 | throw new \Exception( |
90 | - 'Metadata target for CRUD verb '.$verb.' on model '.$key.' does not exist' |
|
90 | + 'Metadata target for CRUD verb ' . $verb . ' on model ' . $key . ' does not exist' |
|
91 | 91 | ); |
92 | 92 | } |
93 | 93 | $parmArray = $this->getParameterNames($method); |