Passed
Push — master ( 33c6fc...b4603e )
by Adrian
01:36
created
src/Action/Insert.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
 
29 29
         $insertSql = new \Sirius\Sql\Insert($connection);
30 30
         $insertSql->into($this->mapper->getTable())
31
-                  ->columns($columns);
31
+                    ->columns($columns);
32 32
         $insertSql->perform();
33 33
         $this->mapper->setEntityPk($this->entity, $connection->lastInsertId());
34 34
     }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
 
36 36
     public function revert()
37 37
     {
38
-        if (! $this->hasRun) {
38
+        if (!$this->hasRun) {
39 39
             return;
40 40
         }
41 41
         $this->mapper->setEntityPk($this->entity, $this->entityId);
Please login to merge, or discard this patch.
src/Action/AttachEntities.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -81,10 +81,10 @@
 block discarded – undo
81 81
         $conn = $this->relation->getNativeMapper()->getWriteConnection();
82 82
         $throughTable = (string)$this->relation->getOption(RelationConfig::THROUGH_TABLE);
83 83
 
84
-        $throughNativeColumns = (array) $this->relation->getOption(RelationConfig::THROUGH_NATIVE_COLUMN);
85
-        $throughForeignColumns = (array) $this->relation->getOption(RelationConfig::THROUGH_FOREIGN_COLUMN);
86
-        $nativeKey = (array) $this->nativeMapper->getEntityPk($this->nativeEntity);
87
-        $foreignKey = (array) $this->foreignMapper->getEntityPk($this->foreignEntity);
84
+        $throughNativeColumns = (array)$this->relation->getOption(RelationConfig::THROUGH_NATIVE_COLUMN);
85
+        $throughForeignColumns = (array)$this->relation->getOption(RelationConfig::THROUGH_FOREIGN_COLUMN);
86
+        $nativeKey = (array)$this->nativeMapper->getEntityPk($this->nativeEntity);
87
+        $foreignKey = (array)$this->foreignMapper->getEntityPk($this->foreignEntity);
88 88
 
89 89
         $delete = new \Sirius\Sql\Delete($conn);
90 90
         $delete->from($throughTable);
Please login to merge, or discard this patch.
src/Action/SoftDelete.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
     protected function execute()
16 16
     {
17 17
         $entityId = $this->mapper->getEntityPk($this->entity);
18
-        if (! $entityId) {
18
+        if (!$entityId) {
19 19
             return;
20 20
         }
21 21
 
Please login to merge, or discard this patch.
src/Query.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
 
80 80
     public function joinWith($name): Query
81 81
     {
82
-        if (! $this->mapper->hasRelation($name)) {
82
+        if (!$this->mapper->hasRelation($name)) {
83 83
             throw new \InvalidArgumentException(
84 84
                 sprintf("Relation %s, not defined for %s", $name, $this->mapper->getTable())
85 85
             );
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
     public function chunk(int $size, callable $callback, int $limit = 100000)
142 142
     {
143 143
         if (!$this->orderBy->build()) {
144
-            $this->orderBy(...(array) $this->mapper->getPrimaryKey());
144
+            $this->orderBy(...(array)$this->mapper->getPrimaryKey());
145 145
         }
146 146
 
147 147
         $run = 0;
Please login to merge, or discard this patch.
src/Entity/GenericEntity.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
         }
83 83
 
84 84
         $value = $this->castAttribute($attribute, $value);
85
-        if (! isset($this->attributes[$attribute]) || $value != $this->attributes[$attribute]) {
85
+        if (!isset($this->attributes[$attribute]) || $value != $this->attributes[$attribute]) {
86 86
             $this->changed[$attribute] = true;
87 87
             $this->state               = StateEnum::CHANGED;
88 88
         }
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 
94 94
     protected function get($attribute)
95 95
     {
96
-        if (! $attribute) {
96
+        if (!$attribute) {
97 97
             return null;
98 98
         }
99 99
 
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
 
105 105
     public function getPersistenceState()
106 106
     {
107
-        if (! empty($this->changed)) {
107
+        if (!empty($this->changed)) {
108 108
         }
109 109
 
110 110
         return $this->state;
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
         $changes = $this->changed;
135 135
         foreach ($this->attributes as $name => $value) {
136 136
             if (is_object($value) && method_exists($value, 'getChanges')) {
137
-                if (! empty($value->getChanges())) {
137
+                if (!empty($value->getChanges())) {
138 138
                     $changes[$name] = true;
139 139
                 }
140 140
             }
Please login to merge, or discard this patch.