@@ -20,7 +20,7 @@ |
||
20 | 20 | public function getPlugin($mixed) |
21 | 21 | { |
22 | 22 | if (!is_subclass_of($mixed, Plugin::class)) { |
23 | - throw new Exception("Plugin should extend " . Plugin::class . " class"); |
|
23 | + throw new Exception("Plugin should extend ".Plugin::class." class"); |
|
24 | 24 | } |
25 | 25 | |
26 | 26 | $plugin = is_object($mixed) ? $mixed : new $mixed($this); |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | 'id' => $this->$property, |
37 | 37 | ]); |
38 | 38 | } |
39 | - } else if(strpos($property, 'Collection') !== false) { |
|
39 | + } else if (strpos($property, 'Collection') !== false) { |
|
40 | 40 | $property = substr($property, 0, -10); |
41 | 41 | $targetSpace = $mapper->getSchema()->toUnderscore($property); |
42 | 42 | if ($mapper->getSchema()->hasSpace($targetSpace)) { |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | } |
59 | 59 | } |
60 | 60 | } |
61 | - throw new BadMethodCallException("Call to undefined method ". get_class($this).'::'.$name); |
|
61 | + throw new BadMethodCallException("Call to undefined method ".get_class($this).'::'.$name); |
|
62 | 62 | } |
63 | 63 | |
64 | 64 | public function __debugInfo() |
@@ -4,7 +4,6 @@ |
||
4 | 4 | |
5 | 5 | use BadMethodCallException; |
6 | 6 | use Exception; |
7 | -use Tarantool\Mapper\Plugin\Annotation; |
|
8 | 7 | |
9 | 8 | class Entity |
10 | 9 | { |
@@ -49,6 +49,9 @@ |
||
49 | 49 | return $entity; |
50 | 50 | } |
51 | 51 | |
52 | + /** |
|
53 | + * @param Space $space |
|
54 | + */ |
|
52 | 55 | private function generateValue($space) |
53 | 56 | { |
54 | 57 | $entity = $this->initializeSequence($space); |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | $space->addIndex($index); |
194 | 194 | } catch (Exception $e) { |
195 | 195 | $presentation = json_encode($properties['indexes'][$i]); |
196 | - throw new Exception("Failed to add index $presentation. ". $e->getMessage(), 0, $e); |
|
196 | + throw new Exception("Failed to add index $presentation. ".$e->getMessage(), 0, $e); |
|
197 | 197 | } |
198 | 198 | } |
199 | 199 | } |
@@ -204,7 +204,7 @@ discard block |
||
204 | 204 | } |
205 | 205 | if (!count($space->getIndexes())) { |
206 | 206 | if (!$space->hasProperty('id')) { |
207 | - throw new Exception("No primary index on ". $space->getName()); |
|
207 | + throw new Exception("No primary index on ".$space->getName()); |
|
208 | 208 | } |
209 | 209 | $space->addIndex(['id']); |
210 | 210 | } |