Passed
Push — master ( 252d04...d75194 )
by Josh
03:00 queued 10s
created
src/services/Loader.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
     {
38 38
 
39 39
         // Check the conditions are right to run
40
-        if ( Craft::$app->request->isCpRequest && !Craft::$app->request->getAcceptsJson())
40
+        if (Craft::$app->request->isCpRequest && !Craft::$app->request->getAcceptsJson())
41 41
         {
42 42
 
43 43
             $segments = Craft::$app->request->getSegments();
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
              * Work out the context for the block type groups configuration
47 47
              */
48 48
             // Entry types
49
-            if ( count($segments) == 5
49
+            if (count($segments) == 5
50 50
                 && $segments[0] == 'settings'
51 51
                 && $segments[1] == 'sections'
52 52
                 && $segments[3] == 'entrytypes'
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
             }
58 58
 
59 59
             // Category groups
60
-            if ( count($segments) == 3
60
+            if (count($segments) == 3
61 61
                 && $segments[0] == 'settings'
62 62
                 && $segments[1] == 'categories'
63 63
                 && $segments[2] != 'new'
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
             }
68 68
 
69 69
             // Global sets
70
-            if ( count($segments) == 3
70
+            if (count($segments) == 3
71 71
                 && $segments[0] == 'settings'
72 72
                 && $segments[1] == 'globals'
73 73
                 && $segments[2] != 'new'
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
             }
78 78
 
79 79
             // Users
80
-            if ( count($segments) == 2
80
+            if (count($segments) == 2
81 81
                 && $segments[0] == 'settings'
82 82
                 && $segments[1] == 'users'
83 83
             )
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
             $context = 'global';
93 93
 
94 94
             // Entry types
95
-            if ( count($segments) >= 3 && $segments[0] == 'entries' )
95
+            if (count($segments) >= 3 && $segments[0] == 'entries')
96 96
             {
97 97
 
98 98
                 if ($segments[2] == 'new')
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
                 }
104 104
                 else
105 105
                 {
106
-                    $entryId = explode('-',$segments[2])[0];
106
+                    $entryId = explode('-', $segments[2])[0];
107 107
                     $entry = Craft::$app->entries->getEntryById($entryId);
108 108
 
109 109
                     if ($entry)
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
 
119 119
             }
120 120
             // Category groups
121
-            else if ( count($segments) >= 3 && $segments[0] == 'categories' )
121
+            else if (count($segments) >= 3 && $segments[0] == 'categories')
122 122
             {
123 123
                 $group = Craft::$app->categories->getGroupByHandle($segments[1]);
124 124
                 if ($group)
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
                 }
128 128
             }
129 129
             // Global sets
130
-            else if ( count($segments) >= 2 && $segments[0] == 'globals' )
130
+            else if (count($segments) >= 2 && $segments[0] == 'globals')
131 131
             {
132 132
                 $set = Craft::$app->globals->getSetByHandle(end($segments));
133 133
                 if ($set)
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
                 }
137 137
             }
138 138
             // Users
139
-            else if ( (count($segments) == 1 && $segments[0] == 'myaccount') || (count($segments) == 2 && $segments[0] == 'users') )
139
+            else if ((count($segments) == 1 && $segments[0] == 'myaccount') || (count($segments) == 2 && $segments[0] == 'users'))
140 140
             {
141 141
                 $context = 'users';
142 142
             }
Please login to merge, or discard this patch.
src/services/BlockTypes.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -261,12 +261,12 @@
 block discarded – undo
261 261
             }
262 262
 
263 263
             $affectedRows = Craft::$app->getDb()->createCommand()
264
-                ->delete('{{%spoon_blocktypes}}',$condition)
264
+                ->delete('{{%spoon_blocktypes}}', $condition)
265 265
                 ->execute();
266 266
 
267 267
             $transaction->commit();
268 268
 
269
-            return (bool) $affectedRows;
269
+            return (bool)$affectedRows;
270 270
         } catch (\Exception $e) {
271 271
             $transaction->rollBack();
272 272
             throw $e;
Please login to merge, or discard this patch.