Passed
Push — master ( ed04c2...7308b3 )
by Nicolaas
08:57
created
src/Admin/DashboardWelcomeQuickLinks.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 
49 49
     public static function get_base_phrase(string $phrase): string
50 50
     {
51
-        if (! in_array($phrase, ['add', 'review', 'edit', 'more'])) {
51
+        if (!in_array($phrase, ['add', 'review', 'edit', 'more'])) {
52 52
             user_error('Phrase must be one of "add", "review", or "edit"', E_USER_ERROR);
53 53
         }
54 54
         $phrase = Config::inst()->get(static::class, $phrase . '_phrase');
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
 
180 180
             usort(
181 181
                 $shortcuts,
182
-                function ($a, $b) {
182
+                function($a, $b) {
183 183
                     $b['SortOrder'] ?? 0;
184 184
                     $a['SortOrder'] ?? 0;
185 185
                 }
@@ -187,11 +187,11 @@  discard block
 block discarded – undo
187 187
 
188 188
             foreach ($shortcuts as $groupCode => $groupDetails) {
189 189
                 $colour = '';
190
-                if (! empty($groupDetails['Colour'])) {
190
+                if (!empty($groupDetails['Colour'])) {
191 191
                     $colour = 'style="background-color: ' . $groupDetails['Colour'] . '"';
192 192
                 }
193 193
                 $icon = '';
194
-                if (! empty($groupDetails['IconClass'])) {
194
+                if (!empty($groupDetails['IconClass'])) {
195 195
                     $icon = '<i class="' . $groupDetails['IconClass'] . '"></i> ';
196 196
                 }
197 197
                 $html .= '
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
                     </div>
202 202
                     <div class="entries">';
203 203
                 $items = $groupDetails['Items'] ?? [];
204
-                if (! empty($entry['Link']) && class_exists($entry['Link'])) {
204
+                if (!empty($entry['Link']) && class_exists($entry['Link'])) {
205 205
                     $obj = Injector::inst()->get($entry['Link']);
206 206
                     if ($obj instanceof DataObject) {
207 207
                         $entry['Link'] = DataObject::get_one($entry['Link'])->CMSEditLink();
@@ -277,7 +277,7 @@  discard block
 block discarded – undo
277 277
         if ($iconClass !== null && $iconClass !== '' && $iconClass !== '0') {
278 278
             $icon = '<i class="' . $iconClass . '"></i> ';
279 279
         }
280
-        if (! $target) {
280
+        if (!$target) {
281 281
             $target = '_self';
282 282
         }
283 283
         $target = ' target="' . $target . '"';
Please login to merge, or discard this patch.
src/Api/DefaultDashboardProvider.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -178,12 +178,12 @@  discard block
 block discarded – undo
178 178
                             $title = $title['title'];
179 179
                             $model = $title['dataClass'] ?? $model;
180 180
                         }
181
-                        if (! class_exists($model)) {
181
+                        if (!class_exists($model)) {
182 182
                             continue;
183 183
                         }
184 184
                         $obj = Injector::inst()->get($model);
185 185
                         if ($obj && $obj->canView()) {
186
-                            if (! $groupAdded) {
186
+                            if (!$groupAdded) {
187 187
                                 DashboardWelcomeQuicklinks::add_group($groupCode, $ma->menu_title(), 100);
188 188
                                 $groupAdded = true;
189 189
                             }
@@ -191,14 +191,14 @@  discard block
 block discarded – undo
191 191
                             $ma = ReflectionHelper::allowAccessToProperty(get_class($ma), 'modelClass');
192 192
                             $ma->modelClass = $model;
193 193
                             $list = $ma->getList();
194
-                            if (! $list) {
194
+                            if (!$list) {
195 195
                                 $list = $model::get();
196 196
                             }
197 197
                             $objectCount = $list->count();
198 198
                             if ($objectCount === 1) {
199 199
                                 $baseTable = Injector::inst()->get($model)->baseTable();
200 200
                                 $obj = DataObject::get_one($model, [$baseTable . '.ClassName' => $model]);
201
-                                if (! $obj) {
201
+                                if (!$obj) {
202 202
                                     $obj = DataObject::get_one($model);
203 203
                                 }
204 204
                                 if ($obj && $obj->hasMethod('CMSEditLink')) {
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
                             $link = '';
214 214
                             if ($obj->hasMethod('CMSListLink')) {
215 215
                                 $link = $obj->CMSListLink();
216
-                            } if (! $link) {
216
+                            } if (!$link) {
217 217
                                 $link = $ma->getLinkForModelTab($model);
218 218
                             }
219 219
                             $titleContainsObjectCount = strpos($title, ' (' . $objectCount . ')');
Please login to merge, or discard this patch.