| @@ -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'])) { | |
| 54 | +        if (!in_array($phrase, ['add', 'review', 'edit'])) { | |
| 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 = '+'; | 
| @@ -180,7 +180,7 @@ discard block | ||
| 180 | 180 | |
| 181 | 181 | usort( | 
| 182 | 182 | $shortcuts, | 
| 183 | -                function ($a, $b) { | |
| 183 | +                function($a, $b) { | |
| 184 | 184 | ($a['SortOrder'] ?? 0) <=> ($b['SortOrder'] ?? 0); | 
| 185 | 185 | } | 
| 186 | 186 | ); | 
| @@ -221,7 +221,7 @@ discard block | ||
| 221 | 221 | $entry['IconClass'] ?? '', | 
| 222 | 222 | $entry['Target'] ?? '', | 
| 223 | 223 | )->Field(); | 
| 224 | -                    if($count > $max && count($items) == $count + 1) { | |
| 224 | +                    if ($count > $max && count($items) == $count + 1) { | |
| 225 | 225 | $html .= $this->makeShortCut( | 
| 226 | 226 |                              $this->Config()->get('more_phrase'), | 
| 227 | 227 | '#', // link | 
| @@ -235,13 +235,13 @@ discard block | ||
| 235 | 235 | } | 
| 236 | 236 | } | 
| 237 | 237 |          $kc = (array) $this->Config()->get('colour_options'); | 
| 238 | -        if(empty($kc)) { | |
| 238 | +        if (empty($kc)) { | |
| 239 | 239 |              $kc = $this->Config()->get('default_colour_options'); | 
| 240 | 240 | } | 
| 241 | 241 | $kcCount = count($kc); | 
| 242 | 242 | $colours = ''; | 
| 243 | 243 |          foreach ($kc as $key => $colour) { | 
| 244 | -            $colours .= ' .grid-wrapper .grid-cell:nth-child(' . $kcCount . 'n+' . ($key + 1) . ') div.header {background-color: ' . $colour . '; color: '.$this->getFontColor($colour).'!important;}'; | |
| 244 | +            $colours .= ' .grid-wrapper .grid-cell:nth-child(' . $kcCount . 'n+' . ($key + 1) . ') div.header {background-color: ' . $colour . '; color: ' . $this->getFontColor($colour) . '!important;}'; | |
| 245 | 245 | } | 
| 246 | 246 | $html .= '</div>'; | 
| 247 | 247 | $html .= '<script>window.setTimeout(dashboardWelcomeQuickLinksSetupInputAndFilter, 500)</script>'; | 
| @@ -255,7 +255,7 @@ discard block | ||
| 255 | 255 |          $useDefaultDashboard = (bool) $this->config()->get('use_default_dashboard_provider'); | 
| 256 | 256 | $classNames = ClassInfo::implementorsOf(DashboardWelcomeQuickLinksProvider::class); | 
| 257 | 257 |          foreach ($classNames as $className) { | 
| 258 | -            if($useDefaultDashboard === false && (string) $className === DefaultDashboardProvider::class) { | |
| 258 | +            if ($useDefaultDashboard === false && (string) $className === DefaultDashboardProvider::class) { | |
| 259 | 259 | continue; | 
| 260 | 260 | } | 
| 261 | 261 | $array += Injector::inst()->get($className)->provideDashboardWelcomeQuickLinks(); | 
| @@ -277,10 +277,10 @@ discard block | ||
| 277 | 277 |          if (!empty($iconClass)) { | 
| 278 | 278 | $icon = '<i class="' . $iconClass . '"></i> '; | 
| 279 | 279 | } | 
| 280 | -        if(!$target) { | |
| 280 | +        if (!$target) { | |
| 281 | 281 | $target = '_self'; | 
| 282 | 282 | } | 
| 283 | - $target = ' target="'.$target.'"'; | |
| 283 | + $target = ' target="' . $target . '"'; | |
| 284 | 284 |          if ($link) { | 
| 285 | 285 | $html = ' | 
| 286 | 286 | ' . $script . ' | 
| @@ -308,8 +308,8 @@ discard block | ||
| 308 | 308 |      { | 
| 309 | 309 | $app = $this->getApplicationName(); | 
| 310 | 310 | $siteConfigTitle = SiteConfig::current_site_config()->Title; | 
| 311 | -        if($siteConfigTitle) { | |
| 312 | -            $app = $siteConfigTitle . ' ('.$app.')'; | |
| 311 | +        if ($siteConfigTitle) { | |
| 312 | +            $app = $siteConfigTitle . ' (' . $app . ')'; | |
| 313 | 313 | } | 
| 314 | 314 |          return ($section = $this->SectionTitle()) ? sprintf('%s for %s', $section, $app) : $app; | 
| 315 | 315 | } |