@@ -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 |
@@ -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 | } |
@@ -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 |
@@ -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 |
@@ -129,10 +129,10 @@ |
||
129 | 129 | public function newEntity(array $data): EntityInterface |
130 | 130 | { |
131 | 131 | $entity = $this->getHydrator() |
132 | - ->hydrate(array_merge( |
|
133 | - $this->getConfig()->getAttributeDefaults(), |
|
134 | - $data |
|
135 | - )); |
|
132 | + ->hydrate(array_merge( |
|
133 | + $this->getConfig()->getAttributeDefaults(), |
|
134 | + $data |
|
135 | + )); |
|
136 | 136 | |
137 | 137 | return $this->behaviours->apply($this, __FUNCTION__, $entity); |
138 | 138 | } |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | return; |
61 | 61 | } |
62 | 62 | $foreignMapper = $this->mapper->getRelation($relationName) |
63 | - ->getForeignMapper(); |
|
63 | + ->getForeignMapper(); |
|
64 | 64 | $currentValue = $this->mapper->getHydrator()->get($entity, $relationName); |
65 | 65 | $this->patchOrCreate($foreignMapper, $currentValue, $attributes); |
66 | 66 | $this->mapper->getHydrator()->set($entity, $relationName, $currentValue); |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | private function patchCollection(EntityInterface $entity, string $relationName, $attributes) |
70 | 70 | { |
71 | 71 | $foreignMapper = $this->mapper->getRelation($relationName) |
72 | - ->getForeignMapper(); |
|
72 | + ->getForeignMapper(); |
|
73 | 73 | /** @var Collection|null $collection */ |
74 | 74 | $collection = $this->mapper->getHydrator()->get($entity, $relationName); |
75 | 75 | if (!$collection || $collection->isEmpty()) { |
@@ -115,8 +115,8 @@ |
||
115 | 115 | |
116 | 116 | $insert = new \Sirius\Sql\Insert($conn); |
117 | 117 | $insert->into($pivotTable) |
118 | - ->columns($insertColumns) |
|
119 | - ->perform(); |
|
118 | + ->columns($insertColumns) |
|
119 | + ->perform(); |
|
120 | 120 | } |
121 | 121 | |
122 | 122 | protected function getNativeEntityHydrator() |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | $query = $this->foreignMapper->newQuery(); |
62 | 62 | |
63 | 63 | $query = $this->joinWithPivotTable($query) |
64 | - ->where($this->options[RelationConfig::PIVOT_NATIVE_COLUMN], $nativePks); |
|
64 | + ->where($this->options[RelationConfig::PIVOT_NATIVE_COLUMN], $nativePks); |
|
65 | 65 | |
66 | 66 | $query = $this->applyQueryCallback($query); |
67 | 67 | |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | { |
116 | 116 | $subselect = $this->foreignMapper->newQuery(); |
117 | 117 | $subselect = $query->subSelectForJoinWith($this->foreignMapper) |
118 | - ->as($reference); |
|
118 | + ->as($reference); |
|
119 | 119 | #$subselect->resetGuards(); |
120 | 120 | #$subselect->setGuards($this->foreignMapper->getConfig()->getGuards()); |
121 | 121 |