Completed
Push — 1.9 ( d29c5f...6104a8 )
by Robbie
13s queued 11s
created
code/pagetypes/DatedUpdateHolder.php 2 patches
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -90,8 +90,8 @@  discard block
 block discarded – undo
90 90
 
91 91
 		// Filter down to single month.
92 92
 		if (isset($year) && isset($monthNumber)) {
93
-			$year = (int)$year;
94
-			$monthNumber = (int)$monthNumber;
93
+			$year = (int) $year;
94
+			$monthNumber = (int) $monthNumber;
95 95
 
96 96
 			$beginDate = sprintf("%04d-%02d-01 00:00:00", $year, $monthNumber);
97 97
 			$endDate = date('Y-m-d H:i:s', strtotime("{$beginDate} +1 month"));
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
 			// Check if the currently processed month is the one that is selected via GET params.
164 164
 			$active = false;
165 165
 			if (isset($year) && isset($monthNumber)) {
166
-				$active = (((int)$currentYear)==$year && ((int)$currentMonthNumber)==$monthNumber);
166
+				$active = (((int) $currentYear) == $year && ((int) $currentMonthNumber) == $monthNumber);
167 167
 			}
168 168
 
169 169
 			// Build the link - keep the tag and date filter, but reset the pagination.
@@ -242,7 +242,7 @@  discard block
 block discarded – undo
242 242
 	public function getMetaTitle() {
243 243
 		$title = $this->data()->getTitle();
244 244
 		$filter = $this->FilterDescription();
245
-		if($filter) {
245
+		if ($filter) {
246 246
 			$title = "{$title} - {$filter}";
247 247
 		}
248 248
 
@@ -313,13 +313,13 @@  discard block
 block discarded – undo
313 313
 		$year = $this->request->getVar('year');
314 314
 		$month = $this->request->getVar('month');
315 315
 
316
-		if ($tag=='') $tag = null;
317
-		if ($from=='') $from = null;
318
-		if ($to=='') $to = null;
319
-		if ($year=='') $year = null;
320
-		if ($month=='') $month = null;
316
+		if ($tag == '') $tag = null;
317
+		if ($from == '') $from = null;
318
+		if ($to == '') $to = null;
319
+		if ($year == '') $year = null;
320
+		if ($month == '') $month = null;
321 321
 
322
-		if (isset($tag)) $tag = (int)$tag;
322
+		if (isset($tag)) $tag = (int) $tag;
323 323
 		if (isset($from)) {
324 324
 			$from = urldecode($from);
325 325
 			$parser = new SS_Datetime;
@@ -332,8 +332,8 @@  discard block
 block discarded – undo
332 332
 			$parser->setValue($to);
333 333
 			$to = $parser->Format('Y-m-d');
334 334
 		}
335
-		if (isset($year)) $year = (int)$year;
336
-		if (isset($month)) $month = (int)$month;
335
+		if (isset($year)) $year = (int) $year;
336
+		if (isset($month)) $month = (int) $month;
337 337
 
338 338
 		// If only "To" has been provided filter by single date. Normalise by swapping with "From".
339 339
 		if (isset($to) && !isset($from)) {
@@ -341,13 +341,13 @@  discard block
 block discarded – undo
341 341
 		}
342 342
 
343 343
 		// Flip the dates if the order is wrong.
344
-		if (isset($to) && isset($from) && strtotime($from)>strtotime($to)) {
344
+		if (isset($to) && isset($from) && strtotime($from) > strtotime($to)) {
345 345
 			list($to, $from) = array($from, $to);
346 346
 
347 347
 			if ($produceErrorMessages) {
348 348
 				Session::setFormMessage(
349 349
 					'Form_DateRangeForm',
350
-					_t('DateUpdateHolder.FilterAppliedMessage','Filter has been applied with the dates reversed.'),
350
+					_t('DateUpdateHolder.FilterAppliedMessage', 'Filter has been applied with the dates reversed.'),
351 351
 					'warning'
352 352
 				);
353 353
 			}
@@ -358,7 +358,7 @@  discard block
 block discarded – undo
358 358
 			if ($produceErrorMessages) {
359 359
 				Session::setFormMessage(
360 360
 					'Form_DateRangeForm',
361
-					_t('DateUpdateHolder.DateRangeFilterMessage','Filtered by a single date.'),
361
+					_t('DateUpdateHolder.DateRangeFilterMessage', 'Filtered by a single date.'),
362 362
 					'warning'
363 363
 				);
364 364
 			}
@@ -414,7 +414,7 @@  discard block
 block discarded – undo
414 414
 		$tagID = $this->request->getVar('tag');
415 415
 
416 416
 		if (isset($tagID)) {
417
-			return TaxonomyTerm::get_by_id('TaxonomyTerm', (int)$tagID);
417
+			return TaxonomyTerm::get_by_id('TaxonomyTerm', (int) $tagID);
418 418
 		}
419 419
 	}
420 420
 
Please login to merge, or discard this patch.
Braces   +30 added lines, -10 removed lines patch added patch discarded remove patch
@@ -313,13 +313,25 @@  discard block
 block discarded – undo
313 313
 		$year = $this->request->getVar('year');
314 314
 		$month = $this->request->getVar('month');
315 315
 
316
-		if ($tag=='') $tag = null;
317
-		if ($from=='') $from = null;
318
-		if ($to=='') $to = null;
319
-		if ($year=='') $year = null;
320
-		if ($month=='') $month = null;
316
+		if ($tag=='') {
317
+			$tag = null;
318
+		}
319
+		if ($from=='') {
320
+			$from = null;
321
+		}
322
+		if ($to=='') {
323
+			$to = null;
324
+		}
325
+		if ($year=='') {
326
+			$year = null;
327
+		}
328
+		if ($month=='') {
329
+			$month = null;
330
+		}
321 331
 
322
-		if (isset($tag)) $tag = (int)$tag;
332
+		if (isset($tag)) {
333
+			$tag = (int)$tag;
334
+		}
323 335
 		if (isset($from)) {
324 336
 			$from = urldecode($from);
325 337
 			$parser = new SS_Datetime;
@@ -332,8 +344,12 @@  discard block
 block discarded – undo
332 344
 			$parser->setValue($to);
333 345
 			$to = $parser->Format('Y-m-d');
334 346
 		}
335
-		if (isset($year)) $year = (int)$year;
336
-		if (isset($month)) $month = (int)$month;
347
+		if (isset($year)) {
348
+			$year = (int)$year;
349
+		}
350
+		if (isset($month)) {
351
+			$month = (int)$month;
352
+		}
337 353
 
338 354
 		// If only "To" has been provided filter by single date. Normalise by swapping with "From".
339 355
 		if (isset($to) && !isset($from)) {
@@ -499,7 +515,9 @@  discard block
 block discarded – undo
499 515
 		// Build the link - keep the tag, but reset month, year and pagination.
500 516
 		$link = HTTP::setGetVar('from', $params['from'], $this->AbsoluteLink(), '&');
501 517
 		$link = HTTP::setGetVar('to', $params['to'], $link, '&');
502
-		if (isset($params['tag'])) $link = HTTP::setGetVar('tag', $params['tag'], $link, '&');
518
+		if (isset($params['tag'])) {
519
+			$link = HTTP::setGetVar('tag', $params['tag'], $link, '&');
520
+		}
503 521
 
504 522
 		$this->redirect($link);
505 523
 	}
@@ -509,7 +527,9 @@  discard block
 block discarded – undo
509 527
 
510 528
 		// Reset the link - only include the tag.
511 529
 		$link = $this->AbsoluteLink();
512
-		if (isset($params['tag'])) $link = HTTP::setGetVar('tag', $params['tag'], $link, '&');
530
+		if (isset($params['tag'])) {
531
+			$link = HTTP::setGetVar('tag', $params['tag'], $link, '&');
532
+		}
513 533
 
514 534
 		$this->redirect($link);
515 535
 	}
Please login to merge, or discard this patch.
code/extensions/CwpWorkflowDefinitionExtension.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -14,10 +14,10 @@
 block discarded – undo
14 14
 	private static $create_default_workflow = true;
15 15
 
16 16
 	public function requireDefaultRecords() {
17
-		if(Config::inst()->get('CwpWorkflowDefinitionExtension', 'create_default_workflow')) {
17
+		if (Config::inst()->get('CwpWorkflowDefinitionExtension', 'create_default_workflow')) {
18 18
 			// Only proceed if a definition using this template has not been created yet
19 19
 			$definition = WorkflowDefinition::get()->filter("Template", "Review and Approve")->First();
20
-			if($definition && $definition->exists()) return;
20
+			if ($definition && $definition->exists()) return;
21 21
 
22 22
 			//generate from the template, which happens after we write the definition
23 23
 			$definition = WorkflowDefinition::create();
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,9 @@
 block discarded – undo
17 17
 		if(Config::inst()->get('CwpWorkflowDefinitionExtension', 'create_default_workflow')) {
18 18
 			// Only proceed if a definition using this template has not been created yet
19 19
 			$definition = WorkflowDefinition::get()->filter("Template", "Review and Approve")->First();
20
-			if($definition && $definition->exists()) return;
20
+			if($definition && $definition->exists()) {
21
+				return;
22
+			}
21 23
 
22 24
 			//generate from the template, which happens after we write the definition
23 25
 			$definition = WorkflowDefinition::create();
Please login to merge, or discard this patch.
code/extensions/SynonymValidator.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -25,8 +25,8 @@  discard block
 block discarded – undo
25 25
 	 * @return mixed
26 26
 	 */
27 27
 	public function php($data) {
28
-		foreach($this->fieldNames as $fieldName) {
29
-			if(empty($data[$fieldName])) {
28
+		foreach ($this->fieldNames as $fieldName) {
29
+			if (empty($data[$fieldName])) {
30 30
 				return;
31 31
 			}
32 32
 
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
 	 * @param mixed $value
42 42
 	 */
43 43
 	protected function validateField($fieldName, $value) {
44
-		if(!$this->validateValue($value)) {
44
+		if (!$this->validateValue($value)) {
45 45
 			$this->validationError(
46 46
 				$fieldName,
47 47
 				_t(
@@ -66,15 +66,15 @@  discard block
 block discarded – undo
66 66
 		);
67 67
 
68 68
 		// strip comments (lines beginning with "#")
69
-		$lines = array_filter($lines, function ($line) {
69
+		$lines = array_filter($lines, function($line) {
70 70
 			$line = trim($line);
71 71
 
72 72
 			return !empty($line) && $line[0] !== '#';
73 73
 		});
74 74
 
75 75
 		// validate each line
76
-		foreach($lines as $line) {
77
-			if(!$this->validateLine($line)) {
76
+		foreach ($lines as $line) {
77
+			if (!$this->validateLine($line)) {
78 78
 				return false;
79 79
 			}
80 80
 		}
@@ -95,8 +95,8 @@  discard block
 block discarded – undo
95 95
 		$parts = explode(',', $line);
96 96
 		$parts = array_filter($parts);
97 97
 
98
-		foreach($parts as $part) {
99
-			if(!$this->validatePart($part)) {
98
+		foreach ($parts as $part) {
99
+			if (!$this->validatePart($part)) {
100 100
 				return false;
101 101
 			}
102 102
 		}
@@ -112,11 +112,11 @@  discard block
 block discarded – undo
112 112
 	 * @return bool
113 113
 	 */
114 114
 	protected function validatePart($part) {
115
-		if(strpos($part, '=>') !== false) {
115
+		if (strpos($part, '=>') !== false) {
116 116
 			$subs = explode('=>', $part);
117 117
 			$subs = array_filter($subs);
118 118
 
119
-			foreach($subs as $sub) {
119
+			foreach ($subs as $sub) {
120 120
 				if (!$this->validateNoSpaces($sub)) {
121 121
 					return false;
122 122
 				}
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
 		$value = trim($value);
139 139
 
140 140
 		// does the value contain 1 or more whitespace characters?
141
-		if(preg_match('/\s+/', $value)) {
141
+		if (preg_match('/\s+/', $value)) {
142 142
 			return false;
143 143
 		}
144 144
 
Please login to merge, or discard this patch.
code/extensions/SynonymsSiteConfig.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
 	
13 13
 	public function updateCMSFields(FieldList $fields) {
14 14
 		// Don't show this field if you're not an admin
15
-		if(!Permission::check('ADMIN')) {
15
+		if (!Permission::check('ADMIN')) {
16 16
 			return;
17 17
 		}
18 18
 		
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
 			TextareaField::create('SearchSynonyms', _t('CwpConfig.SearchSynonyms', 'Search Synonyms'))
23 23
 				->setDescription(_t(
24 24
 					'CwpConfig.SearchSynonyms_Description',
25
-					'Enter as many comma separated synonyms as you wish, where '.
25
+					'Enter as many comma separated synonyms as you wish, where ' .
26 26
 					'each line represents a group of synonyms.<br /> ' .
27 27
 					'You will need to run <a rel="external" target="_blank" href="dev/tasks/Solr_Configure">Solr_Configure</a> if you make any changes'
28 28
 				))
Please login to merge, or discard this patch.
code/search/CwpSearchResult.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -54,11 +54,11 @@  discard block
 block discarded – undo
54 54
 	 */
55 55
 	public function __construct($terms = '', ArrayData $results = null) {
56 56
 		$this->query = $terms;
57
-		if($results) {
57
+		if ($results) {
58 58
 			// Clean up the results.
59 59
 			$matches = $results->Matches;
60
-			foreach($matches as $result) {
61
-				if(!$result->canView()) {
60
+			foreach ($matches as $result) {
61
+				if (!$result->canView()) {
62 62
 					$matches->remove($result);
63 63
 				}
64 64
 			}
@@ -177,12 +177,12 @@  discard block
 block discarded – undo
177 177
 	 * @return string|null
178 178
 	 */
179 179
 	protected function getLink($terms, $format = null) {
180
-		if(!$terms) {
180
+		if (!$terms) {
181 181
 			return null;
182 182
 		}
183
-		$link = 'search/SearchForm?Search='.rawurlencode($terms);
184
-		if($format) {
185
-			$link .= '&format='.rawurlencode($format);
183
+		$link = 'search/SearchForm?Search=' . rawurlencode($terms);
184
+		if ($format) {
185
+			$link .= '&format=' . rawurlencode($format);
186 186
 		}
187 187
 		return $link;
188 188
 	}
Please login to merge, or discard this patch.
code/search/CwpSearchPage.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
 	private static $hide_ancestor = 'CwpSearchPage';
9 9
 	
10 10
 	public function canViewStage($stage = 'Live', $member = null) {
11
-		if(Permission::checkMember($member, 'VIEW_DRAFT_CONTENT')) {
11
+		if (Permission::checkMember($member, 'VIEW_DRAFT_CONTENT')) {
12 12
 			return true;
13 13
 		}
14 14
 		
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 	}
38 38
 	
39 39
 	public function __construct($dataRecord = null) {
40
-		if(!$dataRecord) {
40
+		if (!$dataRecord) {
41 41
 			$dataRecord = $this->generateSearchRecord();
42 42
 		}
43 43
 		parent::__construct($dataRecord);
Please login to merge, or discard this patch.
code/search/CwpSearchEngine.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 	 */
59 59
 	protected function getSearchOptions($spellcheck) {
60 60
 		$options = $this->config()->search_options;
61
-		if($spellcheck) {
61
+		if ($spellcheck) {
62 62
 			$options = array_merge($options, $this->config()->spellcheck_options);
63 63
 		}
64 64
 		return $options;
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
 	 * @return CwpSearchResult|null
104 104
 	 */
105 105
 	public function search($keywords, $classes, $searchIndex, $limit = -1, $start = 0, $followSuggestions = false) {
106
-		if(empty($keywords)) {
106
+		if (empty($keywords)) {
107 107
 			return null;
108 108
 		}
109 109
 
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
 			$result = $this->getResult($keywords, $classes, $searchIndex, $limit, $start, true);
113 113
 			
114 114
 			// Return results if we don't need to refine this any further
115
-			if(!$followSuggestions || $result->hasResults() || !$result->getSuggestion()) {
115
+			if (!$followSuggestions || $result->hasResults() || !$result->getSuggestion()) {
116 116
 				return $result;
117 117
 			}
118 118
 			
@@ -122,13 +122,13 @@  discard block
 block discarded – undo
122 122
 			$newResult->setOriginal($keywords);
123 123
 
124 124
 			// Compare new results to the original query
125
-			if($newResult->hasResults()) {
125
+			if ($newResult->hasResults()) {
126 126
 				return $newResult;
127 127
 			} else {
128 128
 				return $result;
129 129
 			}
130 130
 
131
-		} catch(Exception $e) {
131
+		} catch (Exception $e) {
132 132
 			SS_Log::log($e, SS_Log::WARN);
133 133
 		}
134 134
 		
Please login to merge, or discard this patch.
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -44,10 +44,10 @@
 block discarded – undo
44 44
 		$query->exclude('SiteTree_ShowInSearch', 0);
45 45
 
46 46
 		// Add File_ShowInSearch if the File class is in the query
47
-        $classes = array_column($classes, 'class');
48
-        if (in_array('File', $classes)) {
49
-            $query->exclude('File_ShowInSearch', 0);
50
-        }
47
+		$classes = array_column($classes, 'class');
48
+		if (in_array('File', $classes)) {
49
+			$query->exclude('File_ShowInSearch', 0);
50
+		}
51 51
 
52 52
 		// Artificially lower the amount of results to prevent too high resource usage.
53 53
 		// on subsequent canView check loop.
Please login to merge, or discard this patch.
tests/BasePageTest.php 1 patch
Indentation   +66 added lines, -66 removed lines patch added patch discarded remove patch
@@ -1,80 +1,80 @@
 block discarded – undo
1 1
 <?php
2 2
 class BasePageTest extends SapphireTest
3 3
 {
4
-    public static $fixture_file = 'BasePageTest.yml';
4
+	public static $fixture_file = 'BasePageTest.yml';
5 5
 
6
-    public function setUp()
7
-    {
8
-        parent::setUp();
6
+	public function setUp()
7
+	{
8
+		parent::setUp();
9 9
 
10
-        Config::nest();
11
-        Config::inst()->update('BasePage', 'pdf_export', true);
12
-        Config::inst()->update('BasePage', 'generated_pdf_path', 'assets/_generated_pdfs');
13
-    }
10
+		Config::nest();
11
+		Config::inst()->update('BasePage', 'pdf_export', true);
12
+		Config::inst()->update('BasePage', 'generated_pdf_path', 'assets/_generated_pdfs');
13
+	}
14 14
 
15
-    public function testPdfFilename()
16
-    {
17
-        $page = $this->objFromFixture('BasePage', 'test-page-one');
18
-        $this->assertContains(
19
-            'assets/_generated_pdfs/test-page-one-1.pdf',
20
-            $page->getPdfFilename(),
21
-            'Generated filename for PDF'
22
-        );
23
-    }
15
+	public function testPdfFilename()
16
+	{
17
+		$page = $this->objFromFixture('BasePage', 'test-page-one');
18
+		$this->assertContains(
19
+			'assets/_generated_pdfs/test-page-one-1.pdf',
20
+			$page->getPdfFilename(),
21
+			'Generated filename for PDF'
22
+		);
23
+	}
24 24
 
25
-    public function testPdfLink()
26
-    {
27
-        $page = $this->objFromFixture('BasePage', 'test-page-one');
28
-        $this->assertContains('test-page-one/downloadpdf', $page->PdfLink(), 'Link to download PDF');
29
-    }
25
+	public function testPdfLink()
26
+	{
27
+		$page = $this->objFromFixture('BasePage', 'test-page-one');
28
+		$this->assertContains('test-page-one/downloadpdf', $page->PdfLink(), 'Link to download PDF');
29
+	}
30 30
 
31
-    public function testHomePagePdfLink()
32
-    {
33
-        $page = $this->objFromFixture('BasePage', 'home-page');
34
-        $this->assertContains('home/downloadpdf', $page->PdfLink(), 'Link to download PDF');
35
-    }
31
+	public function testHomePagePdfLink()
32
+	{
33
+		$page = $this->objFromFixture('BasePage', 'home-page');
34
+		$this->assertContains('home/downloadpdf', $page->PdfLink(), 'Link to download PDF');
35
+	}
36 36
 
37
-    public function testPdfLinkDisabled()
38
-    {
39
-        Config::inst()->update('BasePage', 'pdf_export', false);
40
-        $page = $this->objFromFixture('BasePage', 'test-page-one');
41
-        $this->assertFalse($page->PdfLink(), 'No PDF link as the functionality is disabled');
42
-    }
37
+	public function testPdfLinkDisabled()
38
+	{
39
+		Config::inst()->update('BasePage', 'pdf_export', false);
40
+		$page = $this->objFromFixture('BasePage', 'test-page-one');
41
+		$this->assertFalse($page->PdfLink(), 'No PDF link as the functionality is disabled');
42
+	}
43 43
 
44
-    /**
45
-     * Test that the native language name can be returned for the current locale
46
-     *
47
-     * @see i18n
48
-     * @param string $locale
49
-     * @param string $expected
50
-     * @dataProvider localeProvider
51
-     */
52
-    public function testGetSelectedLanguage($locale, $expected)
53
-    {
54
-        if (!class_exists('Translatable')) {
55
-            $this->markTestSkipped('Language tests require Translatable module.');
56
-        }
44
+	/**
45
+	 * Test that the native language name can be returned for the current locale
46
+	 *
47
+	 * @see i18n
48
+	 * @param string $locale
49
+	 * @param string $expected
50
+	 * @dataProvider localeProvider
51
+	 */
52
+	public function testGetSelectedLanguage($locale, $expected)
53
+	{
54
+		if (!class_exists('Translatable')) {
55
+			$this->markTestSkipped('Language tests require Translatable module.');
56
+		}
57 57
 
58
-        Translatable::set_current_locale($locale);
59
-        $page = $this->objFromFixture('BasePage', 'test-page-one');
60
-        $this->assertSame($expected, $page->getSelectedLanguage());
61
-    }
58
+		Translatable::set_current_locale($locale);
59
+		$page = $this->objFromFixture('BasePage', 'test-page-one');
60
+		$this->assertSame($expected, $page->getSelectedLanguage());
61
+	}
62 62
 
63
-    /**
64
-     * @return array[]
65
-     */
66
-    public function localeProvider()
67
-    {
68
-        return array(
69
-            array('en_NZ', 'English'),
70
-            array('af_ZA', 'Afrikaans'),
71
-            array('es_ES', 'espa&ntilde;ol')
72
-        );
73
-    }
63
+	/**
64
+	 * @return array[]
65
+	 */
66
+	public function localeProvider()
67
+	{
68
+		return array(
69
+			array('en_NZ', 'English'),
70
+			array('af_ZA', 'Afrikaans'),
71
+			array('es_ES', 'espa&ntilde;ol')
72
+		);
73
+	}
74 74
 
75
-    public function tearDown()
76
-    {
77
-        Config::unnest();
78
-        parent::tearDown();
79
-    }
75
+	public function tearDown()
76
+	{
77
+		Config::unnest();
78
+		parent::tearDown();
79
+	}
80 80
 }
Please login to merge, or discard this patch.
code/extensions/CwpSiteSummaryExtension.php 1 patch
Indentation   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -5,41 +5,41 @@
 block discarded – undo
5 5
  */
6 6
 class CwpSiteSummaryExtension extends Extension
7 7
 {
8
-    /**
9
-     * Updates the modules used for the version label by:
10
-     *  - Removing SS Framework
11
-     *  - Adding CWP
12
-     *  - Relabelling SS CMS
13
-     *
14
-     * @param array $modules
15
-     */
16
-    public function updateVersionModules(&$modules)
17
-    {
18
-        unset($modules['silverstripe/framework']);
19
-        $modules = ['cwp/cwp' => 'CWP'] + $modules;
20
-        $modules['silverstripe/cms'] = 'SilverStripe CMS';
21
-    }
8
+	/**
9
+	 * Updates the modules used for the version label by:
10
+	 *  - Removing SS Framework
11
+	 *  - Adding CWP
12
+	 *  - Relabelling SS CMS
13
+	 *
14
+	 * @param array $modules
15
+	 */
16
+	public function updateVersionModules(&$modules)
17
+	{
18
+		unset($modules['silverstripe/framework']);
19
+		$modules = ['cwp/cwp' => 'CWP'] + $modules;
20
+		$modules['silverstripe/cms'] = 'SilverStripe CMS';
21
+	}
22 22
 
23
-    /**
24
-     * Updates the dropdown filter used to filter supported packages by renaming the labels (replaces the existing
25
-     * filter options)
26
-     *
27
-     * @param GridFieldDropdownFilter $dropdownFilter
28
-     */
29
-    public function updateDropdownFilterOptions($dropdownFilter)
30
-    {
31
-        $dropdownFilter->removeFilterOption('supported');
32
-        $dropdownFilter->removeFilterOption('unsupported');
23
+	/**
24
+	 * Updates the dropdown filter used to filter supported packages by renaming the labels (replaces the existing
25
+	 * filter options)
26
+	 *
27
+	 * @param GridFieldDropdownFilter $dropdownFilter
28
+	 */
29
+	public function updateDropdownFilterOptions($dropdownFilter)
30
+	{
31
+		$dropdownFilter->removeFilterOption('supported');
32
+		$dropdownFilter->removeFilterOption('unsupported');
33 33
 
34
-        $dropdownFilter->addFilterOption(
35
-            'supported',
36
-            _t(__CLASS__ . '.FilterSupported', 'CWP recipe modules'),
37
-            ['Supported' => true]
38
-        );
39
-        $dropdownFilter->addFilterOption(
40
-            'unsupported',
41
-            _t(__CLASS__ . '.FilterUnsupported', 'Non CWP modules'),
42
-            ['Supported' => false]
43
-        );
44
-    }
34
+		$dropdownFilter->addFilterOption(
35
+			'supported',
36
+			_t(__CLASS__ . '.FilterSupported', 'CWP recipe modules'),
37
+			['Supported' => true]
38
+		);
39
+		$dropdownFilter->addFilterOption(
40
+			'unsupported',
41
+			_t(__CLASS__ . '.FilterUnsupported', 'Non CWP modules'),
42
+			['Supported' => false]
43
+		);
44
+	}
45 45
 }
Please login to merge, or discard this patch.