@@ -29,7 +29,7 @@ |
||
| 29 | 29 | |
| 30 | 30 | $insertSql = new \Sirius\Sql\Insert($connection); |
| 31 | 31 | $insertSql->into($this->mapper->getConfig()->getTable()) |
| 32 | - ->columns($columns); |
|
| 32 | + ->columns($columns); |
|
| 33 | 33 | $insertSql->perform(); |
| 34 | 34 | |
| 35 | 35 | /** |
@@ -23,10 +23,10 @@ |
||
| 23 | 23 | |
| 24 | 24 | $update = new \Sirius\Sql\Update($this->mapper->getWriteConnection()); |
| 25 | 25 | $update->table($this->mapper->getConfig()->getTable()) |
| 26 | - ->columns([ |
|
| 27 | - $this->getOption('deleted_at_column') => $this->now |
|
| 28 | - ]) |
|
| 29 | - ->where('id', $entityId); |
|
| 26 | + ->columns([ |
|
| 27 | + $this->getOption('deleted_at_column') => $this->now |
|
| 28 | + ]) |
|
| 29 | + ->where('id', $entityId); |
|
| 30 | 30 | $update->perform(); |
| 31 | 31 | } |
| 32 | 32 | |
@@ -122,8 +122,8 @@ |
||
| 122 | 122 | |
| 123 | 123 | $insert = new \Sirius\Sql\Insert($conn); |
| 124 | 124 | $insert->into($throughTable) |
| 125 | - ->columns($insertColumns) |
|
| 126 | - ->perform(); |
|
| 125 | + ->columns($insertColumns) |
|
| 126 | + ->perform(); |
|
| 127 | 127 | } |
| 128 | 128 | |
| 129 | 129 | protected function getNativeEntityHydrator() |
@@ -54,8 +54,8 @@ |
||
| 54 | 54 | if (count($columns) > 0) { |
| 55 | 55 | $updateSql = new \Sirius\Sql\Update($connection); |
| 56 | 56 | $updateSql->table($this->mapper->getConfig()->getTable()) |
| 57 | - ->columns($columns) |
|
| 58 | - ->whereAll($conditions, false); |
|
| 57 | + ->columns($columns) |
|
| 58 | + ->whereAll($conditions, false); |
|
| 59 | 59 | $updateSql->perform(); |
| 60 | 60 | } |
| 61 | 61 | } |
@@ -64,8 +64,8 @@ discard block |
||
| 64 | 64 | private function addFirstMethod() |
| 65 | 65 | { |
| 66 | 66 | $method = $this->class->addMethod('first') |
| 67 | - ->setReturnNullable(true) |
|
| 68 | - ->setReturnType($this->mapper->getEntityClass()); |
|
| 67 | + ->setReturnNullable(true) |
|
| 68 | + ->setReturnType($this->mapper->getEntityClass()); |
|
| 69 | 69 | $method->setBody('return parent::first();'); |
| 70 | 70 | } |
| 71 | 71 | |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | { |
| 74 | 74 | $this->namespace->addUse(Collection::class); |
| 75 | 75 | $method = $this->class->addMethod('get') |
| 76 | - ->setReturnType('Collection'); |
|
| 76 | + ->setReturnType('Collection'); |
|
| 77 | 77 | $method->setBody('return parent::get();'); |
| 78 | 78 | $method->addComment(sprintf('@return Collection|%s[]', $this->mapper->getEntityClass())); |
| 79 | 79 | } |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | { |
| 83 | 83 | $this->namespace->addUse(PaginatedCollection::class); |
| 84 | 84 | $method = $this->class->addMethod('paginate') |
| 85 | - ->setReturnType('PaginatedCollection'); |
|
| 85 | + ->setReturnType('PaginatedCollection'); |
|
| 86 | 86 | $method->addParameter('perPage')->setType('int'); |
| 87 | 87 | $method->addParameter('page', 1)->setType('int'); |
| 88 | 88 | $method->setBody('return parent::paginate($perPage, $page);'); |
@@ -48,7 +48,7 @@ |
||
| 48 | 48 | public function joinSubselect(Query $query, string $reference) |
| 49 | 49 | { |
| 50 | 50 | $subselect = $query->subSelectForJoinWith($this->foreignMapper) |
| 51 | - ->as($reference); |
|
| 51 | + ->as($reference); |
|
| 52 | 52 | |
| 53 | 53 | $subselect = $this->applyQueryCallback($subselect); |
| 54 | 54 | |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | ->newQuery(); |
| 59 | 59 | |
| 60 | 60 | $query = $this->joinWithThroughTable($query) |
| 61 | - ->where($this->options[RelationConfig::THROUGH_NATIVE_COLUMN], $nativePks); |
|
| 61 | + ->where($this->options[RelationConfig::THROUGH_NATIVE_COLUMN], $nativePks); |
|
| 62 | 62 | |
| 63 | 63 | $query = $this->applyQueryCallback($query); |
| 64 | 64 | |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | { |
| 111 | 111 | $subselect = $this->foreignMapper->newQuery(); |
| 112 | 112 | $subselect = $query->subSelectForJoinWith($this->foreignMapper) |
| 113 | - ->as($reference); |
|
| 113 | + ->as($reference); |
|
| 114 | 114 | #$subselect->resetGuards(); |
| 115 | 115 | #$subselect->setGuards($this->foreignMapper->getConfig()->getGuards()); |
| 116 | 116 | |
@@ -48,7 +48,7 @@ |
||
| 48 | 48 | public function joinSubselect(Query $query, string $reference) |
| 49 | 49 | { |
| 50 | 50 | $subselect = $query->subSelectForJoinWith($this->foreignMapper) |
| 51 | - ->as($reference); |
|
| 51 | + ->as($reference); |
|
| 52 | 52 | |
| 53 | 53 | $subselect = $this->applyQueryCallback($subselect); |
| 54 | 54 | |
@@ -56,7 +56,7 @@ |
||
| 56 | 56 | } |
| 57 | 57 | |
| 58 | 58 | $constructor = $this->class->addMethod('__construct') |
| 59 | - ->setBody('parent::__construct($attributes, $state);'); |
|
| 59 | + ->setBody('parent::__construct($attributes, $state);'); |
|
| 60 | 60 | $constructor->addParameter('attributes') |
| 61 | 61 | ->setType('array') |
| 62 | 62 | ->setDefaultValue([]); |