@@ -10,7 +10,7 @@ |
||
| 10 | 10 | public static function new(...$args) |
| 11 | 11 | { |
| 12 | 12 | if ($args[0] instanceof Connection) { |
| 13 | - return new ConnectionLocator(function () use ($args) { |
|
| 13 | + return new ConnectionLocator(function() use ($args) { |
|
| 14 | 14 | return $args[0]; |
| 15 | 15 | }); |
| 16 | 16 | } |
@@ -26,7 +26,7 @@ |
||
| 26 | 26 | if (strpos($key, $separator)) { |
| 27 | 27 | $parents = static::getParents($key, $separator); |
| 28 | 28 | foreach ($parents as $parent) { |
| 29 | - if (! isset($arr[$parent])) { |
|
| 29 | + if (!isset($arr[$parent])) { |
|
| 30 | 30 | $arr[$parent] = null; |
| 31 | 31 | } |
| 32 | 32 | } |
@@ -7,7 +7,7 @@ |
||
| 7 | 7 | { |
| 8 | 8 | public static function reference($table, $tableAlias) |
| 9 | 9 | { |
| 10 | - if (! $tableAlias || $table == $tableAlias) { |
|
| 10 | + if (!$tableAlias || $table == $tableAlias) { |
|
| 11 | 11 | return $table; |
| 12 | 12 | } |
| 13 | 13 | |
@@ -88,7 +88,7 @@ |
||
| 88 | 88 | |
| 89 | 89 | public function isLazyLoad() |
| 90 | 90 | { |
| 91 | - return ! isset($this->options[RelationConfig::LOAD_STRATEGY]) || |
|
| 91 | + return !isset($this->options[RelationConfig::LOAD_STRATEGY]) || |
|
| 92 | 92 | $this->options[RelationConfig::LOAD_STRATEGY] == RelationConfig::LOAD_LAZY; |
| 93 | 93 | } |
| 94 | 94 | |
@@ -21,7 +21,7 @@ |
||
| 21 | 21 | |
| 22 | 22 | public function with(Relation $relation) |
| 23 | 23 | { |
| 24 | - $clone = clone($this); |
|
| 24 | + $clone = clone($this); |
|
| 25 | 25 | $clone->relation = $relation; |
| 26 | 26 | |
| 27 | 27 | return $clone; |
@@ -14,11 +14,11 @@ |
||
| 14 | 14 | |
| 15 | 15 | public function setMapper(Mapper $mapper): Relation |
| 16 | 16 | { |
| 17 | - if ($mapper && ! $this->foreignKey) { |
|
| 17 | + if ($mapper && !$this->foreignKey) { |
|
| 18 | 18 | $this->foreignKey = Inflector::singularize($mapper->getName()) . '_id'; |
| 19 | 19 | } |
| 20 | 20 | |
| 21 | - if ($mapper && ! $this->nativeKey) { |
|
| 21 | + if ($mapper && !$this->nativeKey) { |
|
| 22 | 22 | $this->nativeKey = $mapper->getPrimaryKey(); |
| 23 | 23 | } |
| 24 | 24 | |
@@ -15,7 +15,7 @@ |
||
| 15 | 15 | |
| 16 | 16 | public function setForeignMapper($foreignMapper): Relation |
| 17 | 17 | { |
| 18 | - if ($foreignMapper && ! $this->nativeKey) { |
|
| 18 | + if ($foreignMapper && !$this->nativeKey) { |
|
| 19 | 19 | $this->nativeKey = Inflector::singularize($foreignMapper) . '_id'; |
| 20 | 20 | } |
| 21 | 21 | |
@@ -66,7 +66,7 @@ |
||
| 66 | 66 | |
| 67 | 67 | $columns = $mapper->getColumns(); |
| 68 | 68 | |
| 69 | - if ($this->deletedAtColumn && ! array_key_exists($this->deletedAtColumn, $columns)) { |
|
| 69 | + if ($this->deletedAtColumn && !array_key_exists($this->deletedAtColumn, $columns)) { |
|
| 70 | 70 | $mapper->addColumn(Column::datetime($this->deletedAtColumn) |
| 71 | 71 | ->setNullable(true)); |
| 72 | 72 | } |
@@ -90,12 +90,12 @@ |
||
| 90 | 90 | |
| 91 | 91 | $columns = $mapper->getColumns(); |
| 92 | 92 | |
| 93 | - if ($this->createdAtColumn && ! array_key_exists($this->createdAtColumn, $columns)) { |
|
| 93 | + if ($this->createdAtColumn && !array_key_exists($this->createdAtColumn, $columns)) { |
|
| 94 | 94 | $mapper->addColumn(Column::datetime($this->createdAtColumn) |
| 95 | 95 | ->setNullable(true)); |
| 96 | 96 | } |
| 97 | 97 | |
| 98 | - if ($this->updatedAtColumn && ! array_key_exists($this->updatedAtColumn, $columns)) { |
|
| 98 | + if ($this->updatedAtColumn && !array_key_exists($this->updatedAtColumn, $columns)) { |
|
| 99 | 99 | $mapper->addColumn(Column::datetime($this->updatedAtColumn) |
| 100 | 100 | ->setNullable(true) |
| 101 | 101 | ->setAfter($this->createdAtColumn)); |