@@ -27,7 +27,7 @@ |
||
| 27 | 27 | $this->record = $record; |
| 28 | 28 | $this->parentAlias = $parentAlias; |
| 29 | 29 | $this->storeKey = $storeKey; |
| 30 | - $this->knownAs = empty($knownAs) ? $storeKey : $knownAs ; |
|
| 30 | + $this->knownAs = empty($knownAs) ? $storeKey : $knownAs; |
|
| 31 | 31 | return $this; |
| 32 | 32 | } |
| 33 | 33 | |
@@ -35,7 +35,7 @@ |
||
| 35 | 35 | } |
| 36 | 36 | foreach ($this->recordsInJoin as $record) { |
| 37 | 37 | $foreignKeys = $record->getRecord()->getMapper()->getForeignKeys(); |
| 38 | - $fk = empty($knownAs) ? $storeKey : $knownAs ; |
|
| 38 | + $fk = empty($knownAs) ? $storeKey : $knownAs; |
|
| 39 | 39 | if (isset($foreignKeys[$fk])) { |
| 40 | 40 | $recordClassName = $foreignKeys[$fk]->getRemoteRecord(); |
| 41 | 41 | /** @var ARecord $thatRecord */ |
@@ -121,7 +121,7 @@ discard block |
||
| 121 | 121 | // paging |
| 122 | 122 | return $limited |
| 123 | 123 | ? array_slice($results, intval($this->queryBuilder->getOffset()), $this->queryBuilder->getLimit()) |
| 124 | - : $results ; |
|
| 124 | + : $results; |
|
| 125 | 125 | } |
| 126 | 126 | |
| 127 | 127 | /** |
@@ -209,7 +209,7 @@ discard block |
||
| 209 | 209 | $columnKey = $this->condition->getColumnKey(); |
| 210 | 210 | return is_array($columnKey) |
| 211 | 211 | ? $this->filterFromManyValues($this->condition->getOperation(), $result->offsetGet($this->condition->getColumnName()), $this->queryBuilder->getParams(), $columnKey) |
| 212 | - : $this->checkCondition($this->condition->getOperation(), $result->offsetGet($this->condition->getColumnName()), $this->queryBuilder->getParams()[$columnKey] ) |
|
| 212 | + : $this->checkCondition($this->condition->getOperation(), $result->offsetGet($this->condition->getColumnName()), $this->queryBuilder->getParams()[$columnKey]) |
|
| 213 | 213 | ; |
| 214 | 214 | } |
| 215 | 215 | |
@@ -283,6 +283,6 @@ discard block |
||
| 283 | 283 | $a = $resultA->offsetGet($this->sortingOrder->getColumnName()); |
| 284 | 284 | $b = $resultB->offsetGet($this->sortingOrder->getColumnName()); |
| 285 | 285 | |
| 286 | - return (IQueryBuilder::ORDER_ASC == $sortingDirection) ? $a <=> $b : $b <=> $a ; |
|
| 286 | + return (IQueryBuilder::ORDER_ASC == $sortingDirection) ? $a <=> $b : $b <=> $a; |
|
| 287 | 287 | } |
| 288 | 288 | } |
@@ -36,7 +36,7 @@ |
||
| 36 | 36 | protected function parseProperty(string $property): array |
| 37 | 37 | { |
| 38 | 38 | $separated = explode(static::$propertySeparator, $property, 2); |
| 39 | - return ((false !== $separated) && (1 < count($separated)) && mb_strlen($separated[0]) && mb_strlen($separated[1]) ) |
|
| 39 | + return ((false !== $separated) && (1 < count($separated)) && mb_strlen($separated[0]) && mb_strlen($separated[1])) |
|
| 40 | 40 | ? $separated |
| 41 | 41 | : ['', $property] |
| 42 | 42 | ; |
@@ -115,7 +115,7 @@ |
||
| 115 | 115 | #[\ReturnTypeWillChange] |
| 116 | 116 | final public function current() |
| 117 | 117 | { |
| 118 | - return $this->valid() ? $this->offsetGet($this->key) : null ; |
|
| 118 | + return $this->valid() ? $this->offsetGet($this->key) : null; |
|
| 119 | 119 | } |
| 120 | 120 | |
| 121 | 121 | final public function next(): void |
@@ -29,9 +29,9 @@ |
||
| 29 | 29 | |
| 30 | 30 | /** @var int[] */ |
| 31 | 31 | protected static $types = [IEntryType::TYPE_BOOLEAN, |
| 32 | - IEntryType::TYPE_INTEGER, IEntryType::TYPE_FLOAT, |
|
| 33 | - IEntryType::TYPE_STRING, |
|
| 34 | - IEntryType::TYPE_SET, IEntryType::TYPE_ARRAY, IEntryType::TYPE_OBJECT]; |
|
| 32 | + IEntryType::TYPE_INTEGER, IEntryType::TYPE_FLOAT, |
|
| 33 | + IEntryType::TYPE_STRING, |
|
| 34 | + IEntryType::TYPE_SET, IEntryType::TYPE_ARRAY, IEntryType::TYPE_OBJECT]; |
|
| 35 | 35 | |
| 36 | 36 | /** |
| 37 | 37 | * Mapper constructor. |
@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | * @param Entry $entry |
| 18 | 18 | * @param mixed $value |
| 19 | 19 | */ |
| 20 | - protected function typedFill(Entry &$entry, $value): void |
|
| 20 | + protected function typedFill(Entry & $entry, $value): void |
|
| 21 | 21 | { |
| 22 | 22 | $entry->setData($this->typedFillSelection($entry, $value)); |
| 23 | 23 | } |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | * @param mixed $dbValue |
| 28 | 28 | * @return bool|float|int|string |
| 29 | 29 | */ |
| 30 | - protected function typedFillSelection(Entry &$entry, $dbValue) |
|
| 30 | + protected function typedFillSelection(Entry & $entry, $dbValue) |
|
| 31 | 31 | { |
| 32 | 32 | switch ($entry->getType()) { |
| 33 | 33 | case IEntryType::TYPE_BOOLEAN: |
@@ -33,7 +33,7 @@ |
||
| 33 | 33 | } |
| 34 | 34 | $binds[] = $params[$key]; |
| 35 | 35 | $types[] = $this->getTypeOf($params[$key]); |
| 36 | - $query = substr($query, 0, $pos) . '?' . ( $nextSpace ? substr($query, $nextSpace) : '' ); |
|
| 36 | + $query = substr($query, 0, $pos) . '?' . ($nextSpace ? substr($query, $nextSpace) : ''); |
|
| 37 | 37 | } |
| 38 | 38 | return [$query, $binds, $types]; |
| 39 | 39 | } |
@@ -37,7 +37,7 @@ |
||
| 37 | 37 | $connection->setAttribute(PDO::ATTR_PERSISTENT, true); |
| 38 | 38 | } |
| 39 | 39 | |
| 40 | - foreach ($this->attributes as $key => $value){ |
|
| 40 | + foreach ($this->attributes as $key => $value) { |
|
| 41 | 41 | $connection->setAttribute($key, $value); |
| 42 | 42 | } |
| 43 | 43 | |
@@ -86,7 +86,7 @@ |
||
| 86 | 86 | |
| 87 | 87 | public function rowCount(): ?int |
| 88 | 88 | { |
| 89 | - return $this->lastStatement ? $this->lastStatement->rowCount() : null ; |
|
| 89 | + return $this->lastStatement ? $this->lastStatement->rowCount() : null; |
|
| 90 | 90 | } |
| 91 | 91 | |
| 92 | 92 | public function beginTransaction(): bool |