@@ -252,12 +252,12 @@ discard block |
||
252 | 252 | $title = $title['title']; |
253 | 253 | $model = $title['dataClass'] ?? $model; |
254 | 254 | } |
255 | - if (! class_exists($model)) { |
|
255 | + if (!class_exists($model)) { |
|
256 | 256 | continue; |
257 | 257 | } |
258 | 258 | $obj = Injector::inst()->get($model); |
259 | 259 | if ($obj && $obj->canView()) { |
260 | - if (! $groupAdded) { |
|
260 | + if (!$groupAdded) { |
|
261 | 261 | DashboardWelcomeQuicklinks::add_group($groupCode, $ma->menu_title(), 100); |
262 | 262 | $groupAdded = true; |
263 | 263 | } |
@@ -265,17 +265,17 @@ discard block |
||
265 | 265 | $ma = ReflectionHelper::allowAccessToProperty(get_class($ma), 'modelClass'); |
266 | 266 | $ma->modelClass = $model; |
267 | 267 | $list = $ma->getList(); |
268 | - if (! $list) { |
|
268 | + if (!$list) { |
|
269 | 269 | $list = $model::get(); |
270 | 270 | } |
271 | 271 | $objectCount = $list->count(); |
272 | 272 | if ($objectCount === 1) { |
273 | 273 | $baseTable = Injector::inst()->get($model)->baseTable(); |
274 | 274 | $obj = DataObject::get_one($model, [$baseTable . '.ClassName' => $model]); |
275 | - if (! $obj) { |
|
275 | + if (!$obj) { |
|
276 | 276 | $obj = DataObject::get_one($model); |
277 | 277 | } |
278 | - if (! $obj) { |
|
278 | + if (!$obj) { |
|
279 | 279 | $obj = $list->first(); |
280 | 280 | } |
281 | 281 | if ($obj && $obj->hasMethod('CMSEditLink')) { |
@@ -291,7 +291,7 @@ discard block |
||
291 | 291 | if ($obj->hasMethod('CMSListLink')) { |
292 | 292 | $link = $obj->CMSListLink(); |
293 | 293 | } |
294 | - if (! $link) { |
|
294 | + if (!$link) { |
|
295 | 295 | $link = $ma->getLinkForModelTab($model); |
296 | 296 | } |
297 | 297 | $titleContainsObjectCount = strpos($title, ' (' . $objectCount . ')'); |
@@ -330,7 +330,7 @@ discard block |
||
330 | 330 | |
331 | 331 | protected function sortByCountAndTitle(array $array): array |
332 | 332 | { |
333 | - usort($array, function ($a, $b) { |
|
333 | + usort($array, function($a, $b) { |
|
334 | 334 | $countComparison = $b['Count'] <=> $a['Count']; |
335 | 335 | if ($countComparison === 0) { |
336 | 336 | return $a['Title'] <=> $b['Title']; |