@@ -29,7 +29,7 @@ |
||
29 | 29 | * |
30 | 30 | * @param string $class |
31 | 31 | * @param Loader $loader |
32 | - * @return RecordSelector |
|
32 | + * @return Entities\RecordSelector|null |
|
33 | 33 | */ |
34 | 34 | public function selector($class, Loader $loader = null) |
35 | 35 | { |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | private $pivotData = []; |
30 | 30 | |
31 | 31 | /** |
32 | - * @param array $data |
|
32 | + * @param \Spiral\ORM\ORM $data |
|
33 | 33 | * @param string $class |
34 | 34 | * @param ORMInterface $orm |
35 | 35 | */ |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | * |
76 | 76 | * @param RecordInterface|string|int $lookup |
77 | 77 | * |
78 | - * @return true |
|
78 | + * @return boolean |
|
79 | 79 | */ |
80 | 80 | public function has($lookup) |
81 | 81 | { |
@@ -881,7 +881,7 @@ |
||
881 | 881 | * Parse single result row to generate data tree. Must pass parsing to evert nested loader. |
882 | 882 | * |
883 | 883 | * @param array $row |
884 | - * @return bool |
|
884 | + * @return boolean|null |
|
885 | 885 | */ |
886 | 886 | private function parseRow(array $row) |
887 | 887 | { |
@@ -144,8 +144,8 @@ discard block |
||
144 | 144 | * |
145 | 145 | * @see Record::$indexes |
146 | 146 | */ |
147 | - const INDEX = 1000; //Default index type |
|
148 | - const UNIQUE = 2000; //Unique index definition |
|
147 | + const INDEX = 1000; //Default index type |
|
148 | + const UNIQUE = 2000; //Unique index definition |
|
149 | 149 | |
150 | 150 | /** |
151 | 151 | * Indicates that record data were loaded from database (not recently created). |
@@ -350,7 +350,7 @@ discard block |
||
350 | 350 | public function setField($name, $value, $filter = true) |
351 | 351 | { |
352 | 352 | if (!$this->hasField($name)) { |
353 | - throw new FieldException("Undefined field '{$name}' in '" . static::class . "'"); |
|
353 | + throw new FieldException("Undefined field '{$name}' in '".static::class."'"); |
|
354 | 354 | } |
355 | 355 | |
356 | 356 | //Original field value |
@@ -378,7 +378,7 @@ discard block |
||
378 | 378 | public function getField($name, $default = null, $filter = true) |
379 | 379 | { |
380 | 380 | if (!$this->hasField($name)) { |
381 | - throw new FieldException("Undefined field '{$name}' in '" . static::class . "'"); |
|
381 | + throw new FieldException("Undefined field '{$name}' in '".static::class."'"); |
|
382 | 382 | } |
383 | 383 | |
384 | 384 | $value = parent::getField($name, $default, false); |
@@ -583,7 +583,7 @@ discard block |
||
583 | 583 | public function __debugInfo() |
584 | 584 | { |
585 | 585 | $info = [ |
586 | - 'table' => $this->ormSchema[ORMInterface::M_DB] . '/' . $this->ormSchema[ORMInterface::M_TABLE], |
|
586 | + 'table' => $this->ormSchema[ORMInterface::M_DB].'/'.$this->ormSchema[ORMInterface::M_TABLE], |
|
587 | 587 | 'fields' => $this->getFields(), |
588 | 588 | 'errors' => $this->getErrors(), |
589 | 589 | ]; |
@@ -727,7 +727,7 @@ discard block |
||
727 | 727 | { |
728 | 728 | if (!isset($this->ormSchema[ORMInterface::M_RELATIONS][$name])) { |
729 | 729 | throw new RecordException( |
730 | - "Undefined relation {$name} in record " . static::class . '.' |
|
730 | + "Undefined relation {$name} in record ".static::class.'.' |
|
731 | 731 | ); |
732 | 732 | } |
733 | 733 |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | throw new CacheException('Entity cache size exceeded'); |
88 | 88 | } |
89 | 89 | |
90 | - return $this->data[get_class($entity) . '.' . $entity->primaryKey()] = $entity; |
|
90 | + return $this->data[get_class($entity).'.'.$entity->primaryKey()] = $entity; |
|
91 | 91 | } |
92 | 92 | |
93 | 93 | /** |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | return; |
102 | 102 | } |
103 | 103 | |
104 | - unset($this->data[get_class($entity) . '.' . $entity->primaryKey()]); |
|
104 | + unset($this->data[get_class($entity).'.'.$entity->primaryKey()]); |
|
105 | 105 | } |
106 | 106 | |
107 | 107 | /** |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | */ |
115 | 115 | public function has($class, $primaryKey) |
116 | 116 | { |
117 | - return isset($this->data[$class . '.' . $primaryKey]); |
|
117 | + return isset($this->data[$class.'.'.$primaryKey]); |
|
118 | 118 | } |
119 | 119 | |
120 | 120 | /** |
@@ -127,11 +127,11 @@ discard block |
||
127 | 127 | */ |
128 | 128 | public function get($class, $primaryKey) |
129 | 129 | { |
130 | - if (empty($this->data[$class . '.' . $primaryKey])) { |
|
130 | + if (empty($this->data[$class.'.'.$primaryKey])) { |
|
131 | 131 | return null; |
132 | 132 | } |
133 | 133 | |
134 | - return $this->data[$class . '.' . $primaryKey]; |
|
134 | + return $this->data[$class.'.'.$primaryKey]; |
|
135 | 135 | } |
136 | 136 | |
137 | 137 | /** |