@@ -29,7 +29,7 @@ |
||
| 29 | 29 | |
| 30 | 30 | public function getCMSFields() |
| 31 | 31 | { |
| 32 | - $this->beforeUpdateCMSFields(function (FieldList $fields) { |
|
| 32 | + $this->beforeUpdateCMSFields(function(FieldList $fields) { |
|
| 33 | 33 | $fields->removeByName('RedirectorDescHeader'); |
| 34 | 34 | $fields->removeByName('RedirectionType'); |
| 35 | 35 | $fields->removeByName('LinkToID'); |
@@ -66,7 +66,7 @@ |
||
| 66 | 66 | |
| 67 | 67 | public function getCMSFields() |
| 68 | 68 | { |
| 69 | - $this->beforeUpdateCMSFields(function (FieldList $fields) { |
|
| 69 | + $this->beforeUpdateCMSFields(function(FieldList $fields) { |
|
| 70 | 70 | // Main Content tab |
| 71 | 71 | $fields->addFieldToTab( |
| 72 | 72 | 'Root.Main', |
@@ -55,7 +55,7 @@ |
||
| 55 | 55 | |
| 56 | 56 | public function getCMSFields() |
| 57 | 57 | { |
| 58 | - $this->beforeUpdateCMSFields(function (FieldList $fields) { |
|
| 58 | + $this->beforeUpdateCMSFields(function(FieldList $fields) { |
|
| 59 | 59 | $fields->addFieldToTab( |
| 60 | 60 | 'Root.Main', |
| 61 | 61 | $dateTimeField = DatetimeField::create('Date', $this->fieldLabel('Date')), |
@@ -184,7 +184,7 @@ discard block |
||
| 184 | 184 | |
| 185 | 185 | public function getCMSFields() |
| 186 | 186 | { |
| 187 | - $this->beforeUpdateCMSFields(function (FieldList $fields) { |
|
| 187 | + $this->beforeUpdateCMSFields(function(FieldList $fields) { |
|
| 188 | 188 | // Related Pages |
| 189 | 189 | $components = GridFieldConfig_RelationEditor::create(); |
| 190 | 190 | $components->removeComponentsByType(GridFieldAddNewButton::class); |
@@ -292,11 +292,11 @@ discard block |
||
| 292 | 292 | 'Locale' => i18n::convert_rfc1766($loc), |
| 293 | 293 | 'LangName' => $nativeLangName, |
| 294 | 294 | 'Link' => $link, |
| 295 | - 'Current' => (Translatable::get_current_locale()==$loc) |
|
| 295 | + 'Current' => (Translatable::get_current_locale() == $loc) |
|
| 296 | 296 | ))); |
| 297 | 297 | } |
| 298 | 298 | |
| 299 | - if ($translations->count()>1) { |
|
| 299 | + if ($translations->count() > 1) { |
|
| 300 | 300 | return $translations; |
| 301 | 301 | } else { |
| 302 | 302 | return null; |
@@ -134,8 +134,8 @@ discard block |
||
| 134 | 134 | |
| 135 | 135 | // Filter down to single month. |
| 136 | 136 | if (isset($year) && isset($monthNumber)) { |
| 137 | - $year = (int)$year; |
|
| 138 | - $monthNumber = (int)$monthNumber; |
|
| 137 | + $year = (int) $year; |
|
| 138 | + $monthNumber = (int) $monthNumber; |
|
| 139 | 139 | |
| 140 | 140 | $beginDate = sprintf("%04d-%02d-01 00:00:00", $year, $monthNumber); |
| 141 | 141 | $endDate = date('Y-m-d H:i:s', strtotime("{$beginDate} +1 month")); |
@@ -215,7 +215,7 @@ discard block |
||
| 215 | 215 | // Check if the currently processed month is the one that is selected via GET params. |
| 216 | 216 | $active = false; |
| 217 | 217 | if (isset($year) && isset($monthNumber)) { |
| 218 | - $active = (((int)$currentYear)==$year && ((int)$currentMonthNumber)==$monthNumber); |
|
| 218 | + $active = (((int) $currentYear) == $year && ((int) $currentMonthNumber) == $monthNumber); |
|
| 219 | 219 | } |
| 220 | 220 | |
| 221 | 221 | // Build the link - keep the tag and date filter, but reset the pagination. |
@@ -199,9 +199,9 @@ |
||
| 199 | 199 | if (!$terms) { |
| 200 | 200 | return null; |
| 201 | 201 | } |
| 202 | - $link = 'search/SearchForm?Search='.rawurlencode($terms); |
|
| 202 | + $link = 'search/SearchForm?Search=' . rawurlencode($terms); |
|
| 203 | 203 | if ($format) { |
| 204 | - $link .= '&format='.rawurlencode($format); |
|
| 204 | + $link .= '&format=' . rawurlencode($format); |
|
| 205 | 205 | } |
| 206 | 206 | return $link; |
| 207 | 207 | } |
@@ -75,7 +75,7 @@ |
||
| 75 | 75 | ); |
| 76 | 76 | |
| 77 | 77 | // strip comments (lines beginning with "#") |
| 78 | - $lines = array_filter($lines, function ($line) { |
|
| 78 | + $lines = array_filter($lines, function($line) { |
|
| 79 | 79 | $line = trim($line); |
| 80 | 80 | |
| 81 | 81 | return !empty($line) && $line[0] !== '#'; |
@@ -33,7 +33,7 @@ |
||
| 33 | 33 | TextareaField::create('SearchSynonyms', _t(__CLASS__ . '.SearchSynonyms', 'Search Synonyms')) |
| 34 | 34 | ->setDescription(_t( |
| 35 | 35 | __CLASS__ . '.SearchSynonyms_Description', |
| 36 | - 'Enter as many comma separated synonyms as you wish, where '. |
|
| 36 | + 'Enter as many comma separated synonyms as you wish, where ' . |
|
| 37 | 37 | 'each line represents a group of synonyms.<br /> ' . |
| 38 | 38 | 'You will need to run <a rel="external" target="_blank" href="dev/tasks/Solr_Configure">' |
| 39 | 39 | . 'Solr_Configure</a> if you make any changes' |
@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | { |
| 86 | 86 | //if base url YML is defined in YML, use that |
| 87 | 87 | if (Config::inst()->get(BasePage::class, 'pdf_base_url')) { |
| 88 | - $pdfBaseUrl = Config::inst()->get(BasePage::class, 'pdf_base_url').'/'; |
|
| 88 | + $pdfBaseUrl = Config::inst()->get(BasePage::class, 'pdf_base_url') . '/'; |
|
| 89 | 89 | //otherwise, if we are CWP use the secure domain |
| 90 | 90 | } elseif (Environment::getEnv('CWP_SECURE_DOMAIN')) { |
| 91 | 91 | $pdfBaseUrl = Environment::getEnv('CWP_SECURE_DOMAIN') . '/'; |
@@ -273,7 +273,7 @@ discard block |
||
| 273 | 273 | if ($results) { |
| 274 | 274 | $response = $response |
| 275 | 275 | ->customise($results) |
| 276 | - ->customise(array( 'Results' => $results->getResults() )); |
|
| 276 | + ->customise(array('Results' => $results->getResults())); |
|
| 277 | 277 | } |
| 278 | 278 | |
| 279 | 279 | // Render |