@@ -25,7 +25,7 @@ |
||
25 | 25 | /** |
26 | 26 | * Set of allowed enum values. |
27 | 27 | */ |
28 | - const VALUES = []; |
|
28 | + const VALUES = []; |
|
29 | 29 | |
30 | 30 | /** |
31 | 31 | * Default value. |
@@ -61,7 +61,7 @@ |
||
61 | 61 | |
62 | 62 | $schemas[] = $this->container->get(FactoryInterface::class)->make( |
63 | 63 | RecordSchema::class, |
64 | - ['reflection' => new ReflectionEntity($class['name']),] |
|
64 | + ['reflection' => new ReflectionEntity($class['name']), ] |
|
65 | 65 | ); |
66 | 66 | } |
67 | 67 |
@@ -80,7 +80,7 @@ |
||
80 | 80 | |
81 | 81 | if (!$this->isSynced($this->parent, $this->instance)) { |
82 | 82 | //Syncing FKs before primary command been executed |
83 | - $innerCommand->onExecute(function ($innerCommand) use ($parentCommand) { |
|
83 | + $innerCommand->onExecute(function($innerCommand) use ($parentCommand) { |
|
84 | 84 | $parentCommand->addContext( |
85 | 85 | $this->key(Record::INNER_KEY), |
86 | 86 | $this->lookupKey(Record::OUTER_KEY, $this->parent, $innerCommand) |
@@ -63,10 +63,10 @@ discard block |
||
63 | 63 | } |
64 | 64 | |
65 | 65 | if (empty($entity->primaryKey())) { |
66 | - throw new MapException("Unable to store non identified entity " . get_class($entity)); |
|
66 | + throw new MapException("Unable to store non identified entity ".get_class($entity)); |
|
67 | 67 | } |
68 | 68 | |
69 | - $cacheID = get_class($entity) . ':' . $entity->primaryKey(); |
|
69 | + $cacheID = get_class($entity).':'.$entity->primaryKey(); |
|
70 | 70 | |
71 | 71 | return $this->entities[$cacheID] = $entity; |
72 | 72 | } |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | */ |
79 | 79 | public function forget(RecordInterface $entity) |
80 | 80 | { |
81 | - $cacheID = get_class($entity) . ':' . $entity->primaryKey(); |
|
81 | + $cacheID = get_class($entity).':'.$entity->primaryKey(); |
|
82 | 82 | unset($this->entities[$cacheID]); |
83 | 83 | } |
84 | 84 |
@@ -230,7 +230,7 @@ |
||
230 | 230 | public function __toString() |
231 | 231 | { |
232 | 232 | //Do we need to worry about collision rate in this context? |
233 | - return static::class . '#' . hash('crc32', spl_object_hash($this)); |
|
233 | + return static::class.'#'.hash('crc32', spl_object_hash($this)); |
|
234 | 234 | } |
235 | 235 | |
236 | 236 | /** |
@@ -210,7 +210,7 @@ |
||
210 | 210 | $class = (new \ReflectionClass($accessor->getClass()))->getShortName(); |
211 | 211 | |
212 | 212 | //[+] for loaded, [~] for lazy loaded |
213 | - $relations[$relation] = $type . '(' . $class . ') [' . ($accessor->isLoaded() ? '+]' : '~]'); |
|
213 | + $relations[$relation] = $type.'('.$class.') ['.($accessor->isLoaded() ? '+]' : '~]'); |
|
214 | 214 | } |
215 | 215 | |
216 | 216 | return $relations; |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | //Inversed version of BelongsTo |
90 | 90 | if (!$this->isSynced($this->parent, $this->instance)) { |
91 | 91 | //Syncing FKs after primary command been executed |
92 | - $parentCommand->onExecute(function ($outerCommand) use ($innerCommand) { |
|
92 | + $parentCommand->onExecute(function($outerCommand) use ($innerCommand) { |
|
93 | 93 | $innerCommand->addContext( |
94 | 94 | $this->key(Record::OUTER_KEY), |
95 | 95 | $this->lookupKey(Record::INNER_KEY, $this->parent, $outerCommand) |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | |
120 | 120 | if (!empty($morphKey = $this->key(Record::MORPH_KEY))) { |
121 | 121 | //HasOne relation support additional morph key |
122 | - $where['{@}.' . $this->key(Record::MORPH_KEY)] = $this->orm->define( |
|
122 | + $where['{@}.'.$this->key(Record::MORPH_KEY)] = $this->orm->define( |
|
123 | 123 | get_class($this->parent), |
124 | 124 | ORMInterface::R_ROLE_NAME |
125 | 125 | ); |
@@ -80,7 +80,7 @@ |
||
80 | 80 | |
81 | 81 | if (!$this->isSynced($this->parent, $this->instance)) { |
82 | 82 | //Syncing FKs before primary command been executed |
83 | - $innerCommand->onExecute(function ($innerCommand) use ($parentCommand) { |
|
83 | + $innerCommand->onExecute(function($innerCommand) use ($parentCommand) { |
|
84 | 84 | $parentCommand->addContext( |
85 | 85 | $this->key(Record::INNER_KEY), |
86 | 86 | $this->lookupKey(Record::OUTER_KEY, $this->parent, $innerCommand) |
@@ -153,11 +153,11 @@ |
||
153 | 153 | } |
154 | 154 | } elseif (!is_object($value)) { |
155 | 155 | throw new RelationException( |
156 | - "Must be an instance of '{$this->class}', '" . gettype($value) . "' given" |
|
156 | + "Must be an instance of '{$this->class}', '".gettype($value)."' given" |
|
157 | 157 | ); |
158 | 158 | } elseif (!is_a($value, $this->class, false)) { |
159 | 159 | throw new RelationException( |
160 | - "Must be an instance of '{$this->class}', '" . get_class($value) . "' given" |
|
160 | + "Must be an instance of '{$this->class}', '".get_class($value)."' given" |
|
161 | 161 | ); |
162 | 162 | } |
163 | 163 | } |