@@ -457,7 +457,7 @@ discard block |
||
457 | 457 | * |
458 | 458 | * @see findOne() |
459 | 459 | * @param mixed $id Primary key value. |
460 | - * @return RecordEntity|null |
|
460 | + * @return null|RecordInterface |
|
461 | 461 | * @throws SelectorException |
462 | 462 | */ |
463 | 463 | public function findByPK($id) |
@@ -482,7 +482,7 @@ discard block |
||
482 | 482 | * @see findByPK() |
483 | 483 | * @param array $where Selection WHERE statement. |
484 | 484 | * @param bool $setLimit Use limit 1. |
485 | - * @return RecordEntity|null |
|
485 | + * @return null|RecordInterface |
|
486 | 486 | */ |
487 | 487 | public function findOne(array $where = [], $setLimit = true) |
488 | 488 | { |
@@ -160,8 +160,8 @@ discard block |
||
160 | 160 | $offset = count($this->dataColumns); |
161 | 161 | |
162 | 162 | foreach ($columns as $column) { |
163 | - $columnAlias = 'c' . (++$this->countColumns); |
|
164 | - $this->dataColumns[] = $table . '.' . $column . ' AS ' . $columnAlias; |
|
163 | + $columnAlias = 'c'.(++$this->countColumns); |
|
164 | + $this->dataColumns[] = $table.'.'.$column.' AS '.$columnAlias; |
|
165 | 165 | } |
166 | 166 | |
167 | 167 | return $offset; |
@@ -533,7 +533,7 @@ discard block |
||
533 | 533 | public function count($column = self::DEFAULT_COUNTING_FIELD) |
534 | 534 | { |
535 | 535 | if ($column == self::DEFAULT_COUNTING_FIELD && !empty($this->loader->getPrimaryKey())) { |
536 | - $column = 'DISTINCT(' . $this->loader->getPrimaryKey() . ')'; |
|
536 | + $column = 'DISTINCT('.$this->loader->getPrimaryKey().')'; |
|
537 | 537 | } |
538 | 538 | |
539 | 539 | return parent::count($column); |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | * @param array|\Closure $where Selection WHERE statement. |
43 | 43 | * @param array $load Array or relations to be pre-loaded. |
44 | 44 | * @param array $orderBy Sort by conditions. |
45 | - * @return RecordEntity|null |
|
45 | + * @return null|\Spiral\ORM\RecordInterface |
|
46 | 46 | */ |
47 | 47 | public static function findOne($where = [], array $load = [], array $orderBy = []) |
48 | 48 | { |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | * |
63 | 63 | * @param mixed $primaryKey Primary key. |
64 | 64 | * @param array $load Array or relations to be pre-loaded. |
65 | - * @return RecordEntity|null |
|
65 | + * @return null|\Spiral\ORM\RecordInterface |
|
66 | 66 | */ |
67 | 67 | public static function findByPK($primaryKey, array $load = []) |
68 | 68 | { |