Completed
Push — master ( e55059...ea0818 )
by Adrian
02:34
created
src/Collection/Collection.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@
 block discarded – undo
77 77
             /** @var ArrayCollection $changeCollection */
78 78
             $changeCollection = $this->changes[$t];
79 79
             if ($t == $type) {
80
-                if (! $changeCollection->contains($element)) {
80
+                if (!$changeCollection->contains($element)) {
81 81
                     $changeCollection->add($element);
82 82
                 }
83 83
             } else {
Please login to merge, or discard this patch.
src/Entity/Tracker.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 
46 46
     public function setRelation($name, Relation $relation, $callback, $overwrite = false)
47 47
     {
48
-        if ($overwrite || ! isset($this->relations[$name])) {
48
+        if ($overwrite || !isset($this->relations[$name])) {
49 49
             $this->relations[$name]         = $relation;
50 50
             $this->relationCallbacks[$name] = $callback;
51 51
         }
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 
64 64
     public function getRelationResults($name)
65 65
     {
66
-        if (! isset($this->relations[$name])) {
66
+        if (!isset($this->relations[$name])) {
67 67
             return null;
68 68
         }
69 69
 
Please login to merge, or discard this patch.
src/Behaviour/Timestamps.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
             }
43 43
         }
44 44
         if ($action instanceof Update && $this->updateColumn) {
45
-            if (! empty($action->getEntity()->getChanges())) {
45
+            if (!empty($action->getEntity()->getChanges())) {
46 46
                 $action->addColumns([$this->updateColumn => time()]);
47 47
             }
48 48
         }
Please login to merge, or discard this patch.
src/QueryBuilder.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
 
17 17
     public static function getInstance()
18 18
     {
19
-        if (! static::$instance) {
19
+        if (!static::$instance) {
20 20
             static::$instance = new static;
21 21
         }
22 22
 
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
     protected function getQueryClass(Mapper $mapper)
34 34
     {
35 35
         $mapperClass = get_class($mapper);
36
-        if (! isset($this->queryClasses[$mapperClass])) {
36
+        if (!isset($this->queryClasses[$mapperClass])) {
37 37
             $queryClass = $mapperClass . 'Query';
38 38
             if (class_exists($queryClass)) {
39 39
                 $this->queryClasses[$mapperClass] = $queryClass;
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
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
         }
99 99
 
100 100
         $value = $this->castAttribute($attribute, $value);
101
-        if (! isset($this->attributes[$attribute]) || $value != $this->attributes[$attribute]) {
101
+        if (!isset($this->attributes[$attribute]) || $value != $this->attributes[$attribute]) {
102 102
             $this->changed[$attribute] = true;
103 103
             $this->state               = StateEnum::CHANGED;
104 104
         }
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
 
110 110
     public function get($attribute)
111 111
     {
112
-        if (! $attribute) {
112
+        if (!$attribute) {
113 113
             return null;
114 114
         }
115 115
 
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
 
121 121
     public function getPersistenceState()
122 122
     {
123
-        if (! empty($this->changed)) {
123
+        if (!empty($this->changed)) {
124 124
         }
125 125
 
126 126
         return $this->state;
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
         $changes = $this->changed;
151 151
         foreach ($this->attributes as $name => $value) {
152 152
             if (is_object($value) && method_exists($value, 'getChanges')) {
153
-                if (! empty($value->getChanges())) {
153
+                if (!empty($value->getChanges())) {
154 154
                     $changes[$name] = true;
155 155
                 }
156 156
             }
Please login to merge, or discard this patch.
src/Relation/ManyToOne.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -14,11 +14,11 @@  discard block
 block discarded – undo
14 14
         parent::applyDefaults();
15 15
 
16 16
         $foreignKey = $this->foreignMapper->getPrimaryKey();
17
-        if (! isset($this->options[RelationConfig::FOREIGN_KEY])) {
17
+        if (!isset($this->options[RelationConfig::FOREIGN_KEY])) {
18 18
             $this->options[RelationConfig::FOREIGN_KEY] = $foreignKey;
19 19
         }
20 20
 
21
-        if (! isset($this->options[RelationConfig::NATIVE_KEY])) {
21
+        if (!isset($this->options[RelationConfig::NATIVE_KEY])) {
22 22
             $nativeKey                                 = $this->getKeyColumn($this->name, $foreignKey);
23 23
             $this->options[RelationConfig::NATIVE_KEY] = $nativeKey;
24 24
         }
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
     protected function addActionOnDelete(BaseAction $action)
91 91
     {
92 92
         // no cascade delete? treat it as a save
93
-        if (! $this->isCascade()) {
93
+        if (!$this->isCascade()) {
94 94
             $this->addActionOnSave($action);
95 95
         } else {
96 96
             $nativeEntity  = $action->getEntity();
Please login to merge, or discard this patch.
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -29,9 +29,9 @@
 block discarded – undo
29 29
     {
30 30
         $tableRef = $this->foreignMapper->getTableAlias(true);
31 31
         $subselect = $query->subSelectForJoinWith()
32
-                           ->from($this->foreignMapper->getTable())
33
-                           ->columns($this->foreignMapper->getTable() . '.*')
34
-                           ->as($reference);
32
+                            ->from($this->foreignMapper->getTable())
33
+                            ->columns($this->foreignMapper->getTable() . '.*')
34
+                            ->as($reference);
35 35
 
36 36
         $subselect = $this->applyQueryCallback($subselect);
37 37
 
Please login to merge, or discard this patch.
src/Relation/OneToMany.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -14,11 +14,11 @@  discard block
 block discarded – undo
14 14
     protected function applyDefaults(): void
15 15
     {
16 16
         $nativeKey = $this->nativeMapper->getPrimaryKey();
17
-        if (! isset($this->options[RelationConfig::NATIVE_KEY])) {
17
+        if (!isset($this->options[RelationConfig::NATIVE_KEY])) {
18 18
             $this->options[RelationConfig::NATIVE_KEY] = $nativeKey;
19 19
         }
20 20
 
21
-        if (! isset($this->options[RelationConfig::FOREIGN_KEY])) {
21
+        if (!isset($this->options[RelationConfig::FOREIGN_KEY])) {
22 22
             $prefix                                     = Inflector::singularize($this->nativeMapper->getTable());
23 23
             $this->options[RelationConfig::FOREIGN_KEY] = $this->getKeyColumn($prefix, $nativeKey);
24 24
         }
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
     public function attachEntities(EntityInterface $nativeEntity, EntityInterface $foreignEntity)
70 70
     {
71 71
         foreach ($this->keyPairs as $nativeCol => $foreignCol) {
72
-            $nativeKeyValue  = $this->nativeMapper->getEntityAttribute($nativeEntity, $nativeCol);
72
+            $nativeKeyValue = $this->nativeMapper->getEntityAttribute($nativeEntity, $nativeCol);
73 73
             $this->foreignMapper->setEntityAttribute($foreignEntity, $foreignCol, $nativeKeyValue);
74 74
         }
75 75
     }
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
         $remainingRelations = $this->getRemainingRelations($action->getOption('relations'));
92 92
 
93 93
         // no cascade delete? treat as save so we can process the changes
94
-        if (! $this->isCascade()) {
94
+        if (!$this->isCascade()) {
95 95
             $this->addActionOnSave($action);
96 96
         } else {
97 97
             // retrieve them again from the DB since the related collection might not have everything
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
 
124 124
         // save the entities still in the collection
125 125
         foreach ($foreignEntities as $foreignEntity) {
126
-            if (! empty($foreignEntity->getChanges())) {
126
+            if (!empty($foreignEntity->getChanges())) {
127 127
                 $saveAction = $this->foreignMapper
128 128
                     ->newSaveAction($foreignEntity, ['relations' => $remainingRelations]);
129 129
                 $saveAction->addColumns($this->getExtraColumnsForAction());
Please login to merge, or discard this patch.
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -47,9 +47,9 @@
 block discarded – undo
47 47
     {
48 48
         $tableRef = $this->foreignMapper->getTableAlias(true);
49 49
         $subselect = $query->subSelectForJoinWith()
50
-                           ->columns($this->foreignMapper->getTable() . '.*')
51
-                           ->from($this->foreignMapper->getTable())
52
-                           ->as($reference);
50
+                            ->columns($this->foreignMapper->getTable() . '.*')
51
+                            ->from($this->foreignMapper->getTable())
52
+                            ->as($reference);
53 53
 
54 54
         $subselect = $this->applyQueryCallback($subselect);
55 55
 
Please login to merge, or discard this patch.
src/Helpers/QueryHelper.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
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
 
@@ -16,8 +16,8 @@  discard block
 block discarded – undo
16 16
 
17 17
     public static function joinCondition($firsTable, $firstColumns, $secondTable, $secondColumns)
18 18
     {
19
-        $firstColumns = (array) $firstColumns;
20
-        $secondColumns = (array) $secondColumns;
19
+        $firstColumns = (array)$firstColumns;
20
+        $secondColumns = (array)$secondColumns;
21 21
 
22 22
         $parts = [];
23 23
         foreach ($firstColumns as $k => $col) {
Please login to merge, or discard this patch.
src/Query.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@
 block discarded – undo
84 84
 
85 85
     public function joinWith($name): Query
86 86
     {
87
-        if (! $this->mapper->hasRelation($name)) {
87
+        if (!$this->mapper->hasRelation($name)) {
88 88
             throw new \InvalidArgumentException(
89 89
                 sprintf("Relation %s, not defined for %s", $name, $this->mapper->getTable())
90 90
             );
Please login to merge, or discard this patch.