@@ -63,7 +63,7 @@ |
||
63 | 63 | } |
64 | 64 | assert( |
65 | 65 | !$alreadyKey, |
66 | - 'Mapping already defined for model '.$key.' and CRUD verb '.$barrel |
|
66 | + 'Mapping already defined for model ' . $key . ' and CRUD verb ' . $barrel |
|
67 | 67 | ); |
68 | 68 | $metamix[$key][$barrel] = $roll; |
69 | 69 | } |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | assert(0 < count($this->mapping), 'Mapping array must not be empty'); |
41 | 41 | |
42 | 42 | if (!array_key_exists($modelName, $this->mapping)) { |
43 | - throw new \Exception('Metadata mapping for model '.$modelName.' not defined'); |
|
43 | + throw new \Exception('Metadata mapping for model ' . $modelName . ' not defined'); |
|
44 | 44 | } |
45 | 45 | |
46 | 46 | $this->checkCrudVerbDefined($crudVerb); |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | |
49 | 49 | $lookup = $this->mapping[$modelName]; |
50 | 50 | if (!is_array($lookup)) { |
51 | - throw new \Exception('Metadata mapping for model '.$modelName.' not an array'); |
|
51 | + throw new \Exception('Metadata mapping for model ' . $modelName . ' not an array'); |
|
52 | 52 | } |
53 | 53 | |
54 | 54 | if (!array_key_exists($crudVerb, $lookup)) { |
@@ -56,16 +56,16 @@ discard block |
||
56 | 56 | // optional crud verbs don't have to be defined - so we can return null |
57 | 57 | return null; |
58 | 58 | } |
59 | - throw new \Exception('Metadata mapping for CRUD verb '.$crudVerb.' on model '.$modelName.' not defined'); |
|
59 | + throw new \Exception('Metadata mapping for CRUD verb ' . $crudVerb . ' on model ' . $modelName . ' not defined'); |
|
60 | 60 | } |
61 | 61 | $result = $lookup[$crudVerb]; |
62 | 62 | if (!isset($result)) { |
63 | - throw new \Exception('Metadata mapping for CRUD verb '.$crudVerb.' on model '.$modelName.' null'); |
|
63 | + throw new \Exception('Metadata mapping for CRUD verb ' . $crudVerb . ' on model ' . $modelName . ' null'); |
|
64 | 64 | } |
65 | 65 | |
66 | 66 | if (!method_exists($this, $result)) { |
67 | 67 | throw new \Exception( |
68 | - 'Metadata target for CRUD verb '.$crudVerb.' on model '.$modelName.' does not exist' |
|
68 | + 'Metadata target for CRUD verb ' . $crudVerb . ' on model ' . $modelName . ' does not exist' |
|
69 | 69 | ); |
70 | 70 | } |
71 | 71 | |
@@ -87,17 +87,17 @@ discard block |
||
87 | 87 | // check that mapping array is well formed and sane, rather than waiting to stab us with a spatula |
88 | 88 | foreach ($this->mapping as $key => $map) { |
89 | 89 | if (!is_array($map)) { |
90 | - throw new \Exception('Metadata mapping for model '.$key.' not an array'); |
|
90 | + throw new \Exception('Metadata mapping for model ' . $key . ' not an array'); |
|
91 | 91 | } |
92 | 92 | foreach ($map as $verb => $method) { |
93 | 93 | $this->checkCrudVerbDefined($verb); |
94 | 94 | if (!isset($method)) { |
95 | - throw new \Exception('Metadata mapping for CRUD verb '.$verb.' on model '.$key.' null'); |
|
95 | + throw new \Exception('Metadata mapping for CRUD verb ' . $verb . ' on model ' . $key . ' null'); |
|
96 | 96 | } |
97 | 97 | |
98 | 98 | if (!method_exists($this, $method)) { |
99 | 99 | throw new \Exception( |
100 | - 'Metadata target for CRUD verb '.$verb.' on model '.$key.' does not exist' |
|
100 | + 'Metadata target for CRUD verb ' . $verb . ' on model ' . $key . ' does not exist' |
|
101 | 101 | ); |
102 | 102 | } |
103 | 103 | $parmArray = $this->getParameterNames($method); |