@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | $args[0] = $this->prepare($args[0]); |
130 | 130 | |
131 | 131 | //Routing where |
132 | - call_user_func_array([$this->query, 'and' . ucfirst($this->target)], $args); |
|
132 | + call_user_func_array([$this->query, 'and'.ucfirst($this->target)], $args); |
|
133 | 133 | |
134 | 134 | return $this; |
135 | 135 | } |
@@ -158,7 +158,7 @@ discard block |
||
158 | 158 | $args[0] = $this->prepare($args[0]); |
159 | 159 | |
160 | 160 | //Routing where |
161 | - call_user_func_array([$this->query, 'or' . ucfirst($this->target)], $args); |
|
161 | + call_user_func_array([$this->query, 'or'.ucfirst($this->target)], $args); |
|
162 | 162 | |
163 | 163 | return $this; |
164 | 164 | } |
@@ -107,7 +107,7 @@ |
||
107 | 107 | return null; |
108 | 108 | } |
109 | 109 | |
110 | - return $this->entities[$class . '.' . $identity]; |
|
110 | + return $this->entities[$class.'.'.$identity]; |
|
111 | 111 | } |
112 | 112 | |
113 | 113 | /** |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | * |
96 | 96 | * @param string|int $id Primary key value. |
97 | 97 | * |
98 | - * @return EntityInterface|Record|null |
|
98 | + * @return null|\Spiral\ORM\RecordInterface |
|
99 | 99 | */ |
100 | 100 | public function findByPK($id) |
101 | 101 | { |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | * @param array $query Fields and conditions to query by. |
109 | 109 | * @param array $sortBy Always specify sort by to ensure that results are stable. |
110 | 110 | * |
111 | - * @return EntityInterface|Record|null |
|
111 | + * @return null|\Spiral\ORM\RecordInterface |
|
112 | 112 | */ |
113 | 113 | public function findOne(array $query = [], array $sortBy = []) |
114 | 114 | { |
@@ -259,7 +259,7 @@ discard block |
||
259 | 259 | * @param bool $changedEntities Reference, will be set to true if any of entities changed |
260 | 260 | * internally. |
261 | 261 | */ |
262 | - public function hasChanges(bool &$changedEntities = null): bool |
|
262 | + public function hasChanges(bool & $changedEntities = null): bool |
|
263 | 263 | { |
264 | 264 | foreach ($this->entities as $entity) { |
265 | 265 | if ($entity->hasChanges()) { |
@@ -326,7 +326,7 @@ discard block |
||
326 | 326 | |
327 | 327 | $atomics = array_merge( |
328 | 328 | $atomics, |
329 | - $entity->buildAtomics((!empty($container) ? $container . '.' : '') . $offset) |
|
329 | + $entity->buildAtomics((!empty($container) ? $container.'.' : '').$offset) |
|
330 | 330 | ); |
331 | 331 | } |
332 | 332 |
@@ -110,8 +110,8 @@ discard block |
||
110 | 110 | * |
111 | 111 | * @see Record::INDEXES |
112 | 112 | */ |
113 | - const INDEX = 1000; //Default index type |
|
114 | - const UNIQUE = 2000; //Unique index definition |
|
113 | + const INDEX = 1000; //Default index type |
|
114 | + const UNIQUE = 2000; //Unique index definition |
|
115 | 115 | |
116 | 116 | /* |
117 | 117 | * ================================================ |
@@ -523,7 +523,7 @@ discard block |
||
523 | 523 | $this->dispatch('insert', new RecordEvent($this, $command)); |
524 | 524 | |
525 | 525 | //Executed when transaction successfully completed |
526 | - $command->onComplete(function ($command) { |
|
526 | + $command->onComplete(function($command) { |
|
527 | 527 | $this->setState(ORMInterface::STATE_LOADED); |
528 | 528 | $this->flushChanges(); |
529 | 529 | $this->dispatch('created', new RecordEvent($this)); |
@@ -550,7 +550,7 @@ discard block |
||
550 | 550 | $this->dispatch('update', new RecordEvent($this, $command)); |
551 | 551 | |
552 | 552 | //Executed when transaction successfully completed |
553 | - $command->onComplete(function ($command) { |
|
553 | + $command->onComplete(function($command) { |
|
554 | 554 | $this->setState(ORMInterface::STATE_LOADED); |
555 | 555 | $this->flushChanges(); |
556 | 556 | $this->dispatch('updated', new RecordEvent($this, $command)); |
@@ -575,7 +575,7 @@ discard block |
||
575 | 575 | ); |
576 | 576 | |
577 | 577 | //Executed when transaction successfully completed |
578 | - $command->onComplete(function () { |
|
578 | + $command->onComplete(function() { |
|
579 | 579 | $this->setState(ORMInterface::STATE_DELETED); |
580 | 580 | $this->dispatch('deleted', new RecordEvent($this)); |
581 | 581 | }); |