@@ -159,7 +159,7 @@ discard block |
||
| 159 | 159 | $tags = $description->getTags('var'); |
| 160 | 160 | |
| 161 | 161 | if (!count($tags)) { |
| 162 | - throw new Exception("No var tag for " . $entity . '::' . $property->getName()); |
|
| 162 | + throw new Exception("No var tag for ".$entity.'::'.$property->getName()); |
|
| 163 | 163 | } |
| 164 | 164 | |
| 165 | 165 | $byTypes = []; |
@@ -168,7 +168,7 @@ discard block |
||
| 168 | 168 | } |
| 169 | 169 | |
| 170 | 170 | if (!array_key_exists('var', $byTypes)) { |
| 171 | - throw new Exception("No var tag for " . $entity . '::' . $property->getName()); |
|
| 171 | + throw new Exception("No var tag for ".$entity.'::'.$property->getName()); |
|
| 172 | 172 | } |
| 173 | 173 | |
| 174 | 174 | $propertyName = $property->getName(); |
@@ -239,7 +239,7 @@ discard block |
||
| 239 | 239 | $space->createIndex($index); |
| 240 | 240 | } catch (Exception $e) { |
| 241 | 241 | $presentation = json_encode($properties['indexes'][$i]); |
| 242 | - throw new Exception("Failed to add index $presentation. " . $e->getMessage(), 0, $e); |
|
| 242 | + throw new Exception("Failed to add index $presentation. ".$e->getMessage(), 0, $e); |
|
| 243 | 243 | } |
| 244 | 244 | } |
| 245 | 245 | } |
@@ -250,7 +250,7 @@ discard block |
||
| 250 | 250 | } |
| 251 | 251 | if (!count($space->getIndexes())) { |
| 252 | 252 | if (!$space->hasProperty('id')) { |
| 253 | - throw new Exception("No primary index on " . $space->getName()); |
|
| 253 | + throw new Exception("No primary index on ".$space->getName()); |
|
| 254 | 254 | } |
| 255 | 255 | $space->addIndex(['id']); |
| 256 | 256 | } |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | return; |
| 43 | 43 | } |
| 44 | 44 | |
| 45 | - if (array_key_exists($name . '_seq', $this->sequences)) { |
|
| 45 | + if (array_key_exists($name.'_seq', $this->sequences)) { |
|
| 46 | 46 | // use tarantool standard sequence name |
| 47 | 47 | return; |
| 48 | 48 | } |
@@ -66,13 +66,13 @@ discard block |
||
| 66 | 66 | |
| 67 | 67 | $name = $space->name; |
| 68 | 68 | if (!array_key_exists($name, $this->sequences)) { |
| 69 | - if (array_key_exists($name . '_seq', $this->sequences)) { |
|
| 69 | + if (array_key_exists($name.'_seq', $this->sequences)) { |
|
| 70 | 70 | // use tarantool standard sequence name |
| 71 | 71 | $name .= '_seq'; |
| 72 | 72 | } |
| 73 | 73 | } |
| 74 | 74 | |
| 75 | - $next = $this->mapper->getClient()->call('box.sequence.' . $name . ':next'); |
|
| 75 | + $next = $this->mapper->getClient()->call('box.sequence.'.$name.':next'); |
|
| 76 | 76 | |
| 77 | 77 | return $next[0]; |
| 78 | 78 | } |
@@ -49,7 +49,7 @@ |
||
| 49 | 49 | } |
| 50 | 50 | |
| 51 | 51 | if ($this->gettersCache[$name] == 'exception') { |
| 52 | - throw new BadMethodCallException("Call to undefined method " . get_class($this) . '::' . $name); |
|
| 52 | + throw new BadMethodCallException("Call to undefined method ".get_class($this).'::'.$name); |
|
| 53 | 53 | } |
| 54 | 54 | |
| 55 | 55 | [$method, $space, $key, $field] = $this->gettersCache[$name]; |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | |
| 73 | 73 | foreach ($data as $key => $value) { |
| 74 | 74 | if ($value instanceof Entity) { |
| 75 | - $value = $value->getRepository()->getSpace()->getIndex(0)->getValue($value->toArray()) ?: null; |
|
| 75 | + $value = $value->getRepository()->getSpace()->getIndex(0)->getValue($value->toArray()) ?: null; |
|
| 76 | 76 | } |
| 77 | 77 | $instance->$key = $value; |
| 78 | 78 | } |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | $index = $this->getSpace()->castIndex($params); |
| 91 | 91 | |
| 92 | 92 | if ($index === null) { |
| 93 | - throw new Exception("No index for params " . json_encode($params)); |
|
| 93 | + throw new Exception("No index for params ".json_encode($params)); |
|
| 94 | 94 | } |
| 95 | 95 | |
| 96 | 96 | $criteria = Criteria::index($index->id) |
@@ -175,7 +175,7 @@ discard block |
||
| 175 | 175 | { |
| 176 | 176 | $instance = $this->findOne($params); |
| 177 | 177 | if (!$instance) { |
| 178 | - throw new Exception("No " . $this->getSpace()->name . ' found using ' . json_encode($params)); |
|
| 178 | + throw new Exception("No ".$this->getSpace()->name.' found using '.json_encode($params)); |
|
| 179 | 179 | } |
| 180 | 180 | return $instance; |
| 181 | 181 | } |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | public function register($class) |
| 36 | 36 | { |
| 37 | 37 | if (!is_subclass_of($class, BaseProcedure::class)) { |
| 38 | - throw new Exception("Procedure should extend " . BaseProcedure::class . ' class'); |
|
| 38 | + throw new Exception("Procedure should extend ".BaseProcedure::class.' class'); |
|
| 39 | 39 | } |
| 40 | 40 | $this->initSchema(); |
| 41 | 41 | |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | |
| 83 | 83 | $this->presence[__CLASS__] = true; |
| 84 | 84 | |
| 85 | - $this->mapper->getSchema()->once(__CLASS__, function ($mapper) { |
|
| 85 | + $this->mapper->getSchema()->once(__CLASS__, function($mapper) { |
|
| 86 | 86 | $mapper->getSchema() |
| 87 | 87 | ->createSpace('_procedure') |
| 88 | 88 | ->addProperties([ |