@@ -426,7 +426,7 @@ |
||
| 426 | 426 | ): AccessorInterface { |
| 427 | 427 | if (!is_string($accessor) || !class_exists($accessor)) { |
| 428 | 428 | throw new EntityException( |
| 429 | - "Unable to create accessor for field {$name} in " . static::class |
|
| 429 | + "Unable to create accessor for field {$name} in ".static::class |
|
| 430 | 430 | ); |
| 431 | 431 | } |
| 432 | 432 | |
@@ -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 | { |
@@ -105,8 +105,8 @@ discard block |
||
| 105 | 105 | * |
| 106 | 106 | * @see Record::INDEXES |
| 107 | 107 | */ |
| 108 | - const INDEX = 1000; //Default index type |
|
| 109 | - const UNIQUE = 2000; //Unique index definition |
|
| 108 | + const INDEX = 1000; //Default index type |
|
| 109 | + const UNIQUE = 2000; //Unique index definition |
|
| 110 | 110 | |
| 111 | 111 | /* |
| 112 | 112 | * ================================================ |
@@ -496,7 +496,7 @@ discard block |
||
| 496 | 496 | ); |
| 497 | 497 | |
| 498 | 498 | //Executed when transaction successfully completed |
| 499 | - $command->onComplete(function () { |
|
| 499 | + $command->onComplete(function() { |
|
| 500 | 500 | $this->setState(ORMInterface::STATE_LOADED); |
| 501 | 501 | $this->flushUpdates(); |
| 502 | 502 | $this->dispatch('created', new RecordEvent($this)); |
@@ -522,7 +522,7 @@ discard block |
||
| 522 | 522 | ); |
| 523 | 523 | |
| 524 | 524 | //Executed when transaction successfully completed |
| 525 | - $command->onComplete(function () { |
|
| 525 | + $command->onComplete(function() { |
|
| 526 | 526 | $this->setState(ORMInterface::STATE_LOADED); |
| 527 | 527 | $this->flushUpdates(); |
| 528 | 528 | $this->dispatch('updated', new RecordEvent($this)); |
@@ -547,7 +547,7 @@ discard block |
||
| 547 | 547 | ); |
| 548 | 548 | |
| 549 | 549 | //Executed when transaction successfully completed |
| 550 | - $command->onComplete(function () { |
|
| 550 | + $command->onComplete(function() { |
|
| 551 | 551 | $this->setState(ORMInterface::STATE_DELETED); |
| 552 | 552 | $this->dispatch('deleted', new RecordEvent($this)); |
| 553 | 553 | }); |