Completed
Push — PAC-294-integration-strict-mod... ( 4c7c15 )
by
unknown
25s
created
src/Subjects/BunchSubject.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -197,7 +197,7 @@
 block discarded – undo
197 197
     {
198 198
 
199 199
         // explode the path of the root category
200
-        list ($rootCategoryPath, ) = explode('/', $path);
200
+        list ($rootCategoryPath,) = explode('/', $path);
201 201
 
202 202
         // query whether or not a root category with the given path exists
203 203
         if ($rootCategory = $this->getCategoryByPath($rootCategoryPath)) {
Please login to merge, or discard this patch.
src/Subjects/AbstractCategorySubject.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -303,7 +303,7 @@
 block discarded – undo
303 303
 
304 304
         // load the global data we've prepared initially
305 305
         $this->taxClasses = $status[RegistryKeys::GLOBAL_DATA][RegistryKeys::TAX_CLASSES];
306
-        $this->storeWebsites =  $status[RegistryKeys::GLOBAL_DATA][RegistryKeys::STORE_WEBSITES];
306
+        $this->storeWebsites = $status[RegistryKeys::GLOBAL_DATA][RegistryKeys::STORE_WEBSITES];
307 307
 
308 308
         // load the categories for the admin store view from the global data
309 309
         $this->categories = $status[RegistryKeys::GLOBAL_DATA][RegistryKeys::CATEGORIES][StoreViewCodes::ADMIN];
Please login to merge, or discard this patch.
src/Loaders/RawEntityLoader.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -86,8 +86,8 @@
 block discarded – undo
86 86
             // load the columns from the metadata
87 87
             $columns = array_filter(
88 88
                 $columnMetadataLoader->load($entityType),
89
-                function ($value) {
90
-                    return $value['Key'] !== 'PRI' && $value['Null'] === 'NO' ;
89
+                function($value) {
90
+                    return $value['Key'] !== 'PRI' && $value['Null'] === 'NO';
91 91
                 }
92 92
             );
93 93
             // initialize the raw entities and their default values, if available
Please login to merge, or discard this patch.
src/Listeners/SortCategoryListener.php 1 patch
Spacing   +6 added lines, -9 removed lines patch added patch discarded remove patch
@@ -164,11 +164,9 @@  discard block
 block discarded – undo
164 164
 
165 165
             // sort the main rows by the path, store_view_code and position
166 166
             // ATTENTION: we use uasort, because we NEED to preserve the keys
167
-            uasort($this->mainRows, function ($a, $b) {
167
+            uasort($this->mainRows, function($a, $b) {
168 168
                 return
169
-                    strcmp($a[ColumnKeys::PATH], $b[ColumnKeys::PATH]) ?:
170
-                    strcmp($a[ColumnKeys::STORE_VIEW_CODE], $b[ColumnKeys::STORE_VIEW_CODE]) ?:
171
-                    strcmp($a[ColumnKeys::POSITION], $b[ColumnKeys::POSITION]);
169
+                    strcmp($a[ColumnKeys::PATH], $b[ColumnKeys::PATH]) ?: strcmp($a[ColumnKeys::STORE_VIEW_CODE], $b[ColumnKeys::STORE_VIEW_CODE]) ?: strcmp($a[ColumnKeys::POSITION], $b[ColumnKeys::POSITION]);
172 170
             });
173 171
 
174 172
             // update the position of the categories and the categories on the same level
@@ -181,10 +179,9 @@  discard block
 block discarded – undo
181 179
             $this->artefacts = array_merge(array_values($this->artefacts), $this->storeViewRows);
182 180
 
183 181
             // sort the artefacts again, because we want to export them in the expected order
184
-            usort($this->artefacts, function ($a, $b) {
182
+            usort($this->artefacts, function($a, $b) {
185 183
                 return
186
-                    strcmp($a[ColumnKeys::PATH], $b[ColumnKeys::PATH]) ?:
187
-                    strcmp($a[ColumnKeys::STORE_VIEW_CODE], $b[ColumnKeys::STORE_VIEW_CODE]);
184
+                    strcmp($a[ColumnKeys::PATH], $b[ColumnKeys::PATH]) ?: strcmp($a[ColumnKeys::STORE_VIEW_CODE], $b[ColumnKeys::STORE_VIEW_CODE]);
188 185
             });
189 186
 
190 187
             // replace the artefacts to be exported later
@@ -284,7 +281,7 @@  discard block
 block discarded – undo
284 281
         }
285 282
 
286 283
         // sor the categories by their position and KEEP the keys
287
-        uasort($categoriesOnSameLevel, function ($a, $b) {
284
+        uasort($categoriesOnSameLevel, function($a, $b) {
288 285
             // return 0 when the position is equal (should never happen)
289 286
             if ($a[MemberNames::POSITION] == $b[MemberNames::POSITION]) {
290 287
                 return 0;
@@ -432,7 +429,7 @@  discard block
 block discarded – undo
432 429
         // iterate over the IDs
433 430
         foreach ($ids as $id) {
434 431
             // load the category with the actual ID
435
-            $existingCategories = array_filter($this->existingCategories, function ($existingCategory) use ($id) {
432
+            $existingCategories = array_filter($this->existingCategories, function($existingCategory) use ($id) {
436 433
                 return (int) $existingCategory[MemberNames::ENTITY_ID] === (int) $id;
437 434
             });
438 435
 
Please login to merge, or discard this patch.
src/Observers/UrlRewriteUpdateObserver.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -99,7 +99,7 @@
 block discarded – undo
99 99
 
100 100
                 // skip update of URL rewrite, if nothing to change
101 101
                 if ($targetPath === $existingUrlRewrite[MemberNames::TARGET_PATH] &&
102
-                    301 === (int)$existingUrlRewrite[MemberNames::REDIRECT_TYPE]) {
102
+                    301 === (int) $existingUrlRewrite[MemberNames::REDIRECT_TYPE]) {
103 103
                     // stop processing the URL rewrite
104 104
                     continue;
105 105
                 }
Please login to merge, or discard this patch.
src/Repositories/CategoryRepository.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -123,7 +123,7 @@
 block discarded – undo
123 123
     public function findAllByPath($path)
124 124
     {
125 125
         // load and return the categories with the passed path
126
-        $this->categoryByPathChildrenStmt->execute(array(MemberNames::PATH => $path.'/%'));
126
+        $this->categoryByPathChildrenStmt->execute(array(MemberNames::PATH => $path . '/%'));
127 127
         $result = $this->categoryByPathChildrenStmt->fetchAll(\PDO::FETCH_ASSOC);
128 128
         return $result ? $result : [];
129 129
     }
Please login to merge, or discard this patch.
src/Observers/CategoryObserver.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -176,7 +176,7 @@
 block discarded – undo
176 176
         $this->prepareStoreViewCode();
177 177
 
178 178
         // explode the path into the category names
179
-        if ($categories = $this->getValue(ColumnKeys::PATH, array(), function ($value) {
179
+        if ($categories = $this->getValue(ColumnKeys::PATH, array(), function($value) {
180 180
             return $this->serializer->explode($value);
181 181
         })) {
182 182
             // initialize the flag to query whether or not the category is a leaf
Please login to merge, or discard this patch.
src/Observers/NormalizePathObserver.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -94,7 +94,7 @@
 block discarded – undo
94 94
      */
95 95
     protected function process()
96 96
     {
97
-        $this->setValue(ColumnKeys::PATH, $this->getValue(ColumnKeys::PATH, null, function ($value) {
97
+        $this->setValue(ColumnKeys::PATH, $this->getValue(ColumnKeys::PATH, null, function($value) {
98 98
             return $this->serializer->normalize($value);
99 99
         }));
100 100
     }
Please login to merge, or discard this patch.