@@ -51,11 +51,11 @@ discard block |
||
51 | 51 | |
52 | 52 | public static function get_base_phrase(string $phrase): string |
53 | 53 | { |
54 | - if(!in_array($phrase, ['add', 'review', 'edit', 'more'])) { |
|
54 | + if (!in_array($phrase, ['add', 'review', 'edit', 'more'])) { |
|
55 | 55 | user_error('Phrase must be one of "add", "review", or "edit"', E_USER_ERROR); |
56 | 56 | } |
57 | - $phrase = Config::inst()->get(static::class, $phrase .'_phrase'); |
|
58 | - return _t('DashboardWelcomeQuicklinks.'.$phrase, $phrase); |
|
57 | + $phrase = Config::inst()->get(static::class, $phrase . '_phrase'); |
|
58 | + return _t('DashboardWelcomeQuicklinks.' . $phrase, $phrase); |
|
59 | 59 | } |
60 | 60 | |
61 | 61 | private static string $add_phrase = '+'; |
@@ -181,7 +181,7 @@ discard block |
||
181 | 181 | |
182 | 182 | usort( |
183 | 183 | $shortcuts, |
184 | - function ($a, $b) { |
|
184 | + function($a, $b) { |
|
185 | 185 | ($a['SortOrder'] ?? 0) <=> ($b['SortOrder'] ?? 0); |
186 | 186 | } |
187 | 187 | ); |
@@ -222,7 +222,7 @@ discard block |
||
222 | 222 | $entry['IconClass'] ?? '', |
223 | 223 | $entry['Target'] ?? '', |
224 | 224 | )->Field(); |
225 | - if($count > $max && count($items) == $count + 1) { |
|
225 | + if ($count > $max && count($items) == $count + 1) { |
|
226 | 226 | $html .= $this->makeShortCut( |
227 | 227 | DashboardWelcomeQuicklinks::get_base_phrase('more'), |
228 | 228 | '#', // link |
@@ -236,13 +236,13 @@ discard block |
||
236 | 236 | } |
237 | 237 | } |
238 | 238 | $kc = (array) $this->Config()->get('colour_options'); |
239 | - if(empty($kc)) { |
|
239 | + if (empty($kc)) { |
|
240 | 240 | $kc = $this->Config()->get('default_colour_options'); |
241 | 241 | } |
242 | 242 | $kcCount = count($kc); |
243 | 243 | $colours = ''; |
244 | 244 | foreach ($kc as $key => $colour) { |
245 | - $colours .= ' .grid-wrapper .grid-cell:nth-child(' . $kcCount . 'n+' . ($key + 1) . ') div.header {background-color: ' . $colour . '; color: '.$this->getFontColor($colour).'!important;}'; |
|
245 | + $colours .= ' .grid-wrapper .grid-cell:nth-child(' . $kcCount . 'n+' . ($key + 1) . ') div.header {background-color: ' . $colour . '; color: ' . $this->getFontColor($colour) . '!important;}'; |
|
246 | 246 | } |
247 | 247 | $html .= '</div>'; |
248 | 248 | $html .= '<script>window.setTimeout(dashboardWelcomeQuickLinksSetupInputAndFilter, 500)</script>'; |
@@ -256,7 +256,7 @@ discard block |
||
256 | 256 | $useDefaultDashboard = (bool) $this->config()->get('use_default_dashboard_provider'); |
257 | 257 | $classNames = ClassInfo::implementorsOf(DashboardWelcomeQuickLinksProvider::class); |
258 | 258 | foreach ($classNames as $className) { |
259 | - if($useDefaultDashboard === false && (string) $className === DefaultDashboardProvider::class) { |
|
259 | + if ($useDefaultDashboard === false && (string) $className === DefaultDashboardProvider::class) { |
|
260 | 260 | continue; |
261 | 261 | } |
262 | 262 | $array += Injector::inst()->get($className)->provideDashboardWelcomeQuickLinks(); |
@@ -278,10 +278,10 @@ discard block |
||
278 | 278 | if (!empty($iconClass)) { |
279 | 279 | $icon = '<i class="' . $iconClass . '"></i> '; |
280 | 280 | } |
281 | - if(!$target) { |
|
281 | + if (!$target) { |
|
282 | 282 | $target = '_self'; |
283 | 283 | } |
284 | - $target = ' target="'.$target.'"'; |
|
284 | + $target = ' target="' . $target . '"'; |
|
285 | 285 | if ($link) { |
286 | 286 | $html = ' |
287 | 287 | ' . $script . ' |
@@ -309,8 +309,8 @@ discard block |
||
309 | 309 | { |
310 | 310 | $app = $this->getApplicationName(); |
311 | 311 | $siteConfigTitle = SiteConfig::current_site_config()->Title; |
312 | - if($siteConfigTitle) { |
|
313 | - $app = $siteConfigTitle . ' ('.$app.')'; |
|
312 | + if ($siteConfigTitle) { |
|
313 | + $app = $siteConfigTitle . ' (' . $app . ')'; |
|
314 | 314 | } |
315 | 315 | return ($section = $this->SectionTitle()) ? sprintf('%s for %s', $section, $app) : $app; |
316 | 316 | } |