Completed
Push — master ( 25a516...fbacac )
by Ingo
10s
created
code/controller/SiteConfigLeftAndMain.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
 		)->setHTMLID('Form_EditForm');
71 71
 		$form->setValidationResponseCallback(function() use ($negotiator, $form) {
72 72
 			$request = $this->getRequest();
73
-			if($request->isAjax() && $negotiator) {
73
+			if ($request->isAjax() && $negotiator) {
74 74
 				$form->setupFormErrors();
75 75
 				$result = $form->forTemplate();
76 76
 
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
 		
129 129
 		try {
130 130
 			$siteConfig->write();
131
-		} catch(ValidationException $ex) {
131
+		} catch (ValidationException $ex) {
132 132
 			$form->sessionMessage($ex->getResult()->message(), 'bad');
133 133
 			return $this->getResponseNegotiator()->respond($this->request);
134 134
 		}
Please login to merge, or discard this patch.
tests/behat/features/bootstrap/Context/FeatureContext.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
 
34 34
         // Add extra contexts with more steps
35 35
         $this->useContext('ThemeContext', new \SilverStripe\Siteconfig\Test\Behaviour\ThemeContext($parameters));
36
-        if(!class_exists('SiteTree')) {
36
+        if (!class_exists('SiteTree')) {
37 37
             return;
38 38
         }
39 39
 
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
         $factory = $fixtureContext->getFixtureFactory();
42 42
         foreach (\ClassInfo::subclassesFor('SiteTree') as $id => $class) {
43 43
             $blueprint = \Injector::inst()->create('FixtureBlueprint', $class);
44
-            $blueprint->addCallback('afterCreate', function ($obj, $identifier, &$data, &$fixtures) {
44
+            $blueprint->addCallback('afterCreate', function($obj, $identifier, &$data, &$fixtures) {
45 45
                 $obj->publish('Stage', 'Live');
46 46
             });
47 47
             $factory->define($class, $blueprint);
Please login to merge, or discard this patch.
code/model/SiteConfig.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -141,9 +141,9 @@  discard block
 block discarded – undo
141 141
             $fields->makeFieldReadonly($titleField);
142 142
         }
143 143
 
144
-        if (file_exists(BASE_PATH . '/install.php')) {
144
+        if (file_exists(BASE_PATH.'/install.php')) {
145 145
             $fields->addFieldToTab("Root.Main", new LiteralField("InstallWarningHeader",
146
-                "<p class=\"message warning\">" . _t("SiteTree.REMOVE_INSTALL_WARNING",
146
+                "<p class=\"message warning\">"._t("SiteTree.REMOVE_INSTALL_WARNING",
147 147
                 "Warning: You should remove install.php from this SilverStripe install for security reasons.")
148 148
                 . "</p>"), "Title");
149 149
         }
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
     public function getAvailableThemes($baseDir = null)
166 166
     {
167 167
         $themes = SSViewer::get_themes($baseDir);
168
-        $disabled = (array)$this->config()->disabled_themes;
168
+        $disabled = (array) $this->config()->disabled_themes;
169 169
     
170 170
         foreach ($disabled as $theme) {
171 171
             if (isset($themes[$theme])) {
Please login to merge, or discard this patch.
tests/SiteConfigTest.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -26,16 +26,16 @@
 block discarded – undo
26 26
     {
27 27
         $config = $this->objFromFixture('SiteConfig', 'default');
28 28
         $ds = DIRECTORY_SEPARATOR;
29
-        $testThemeBaseDir = TEMP_FOLDER . $ds . 'test-themes';
29
+        $testThemeBaseDir = TEMP_FOLDER.$ds.'test-themes';
30 30
         
31 31
         if (file_exists($testThemeBaseDir)) {
32 32
             Filesystem::removeFolder($testThemeBaseDir);
33 33
         }
34 34
         mkdir($testThemeBaseDir);
35
-        mkdir($testThemeBaseDir . $ds . 'blackcandy');
36
-        mkdir($testThemeBaseDir . $ds . 'blackcandy_blog');
37
-        mkdir($testThemeBaseDir . $ds . 'darkshades');
38
-        mkdir($testThemeBaseDir . $ds . 'darkshades_blog');
35
+        mkdir($testThemeBaseDir.$ds.'blackcandy');
36
+        mkdir($testThemeBaseDir.$ds.'blackcandy_blog');
37
+        mkdir($testThemeBaseDir.$ds.'darkshades');
38
+        mkdir($testThemeBaseDir.$ds.'darkshades_blog');
39 39
         
40 40
         $themes = $config->getAvailableThemes($testThemeBaseDir);
41 41
         $this->assertContains('blackcandy', $themes, 'Test themes contain blackcandy theme');
Please login to merge, or discard this patch.
features/bootstrap/SilverStripe/SiteConfig/Test/Behaviour/ThemeContext.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -31,9 +31,9 @@  discard block
 block discarded – undo
31 31
             throw new \InvalidArgumentException("Bad theme '$theme'");
32 32
         }
33 33
 
34
-        $this->requireDir(BASE_PATH . '/themes');
35
-        $this->requireDir(BASE_PATH . '/themes/' . $theme);
36
-        $this->requireDir(BASE_PATH . '/themes/' . $theme . '/templates');
34
+        $this->requireDir(BASE_PATH.'/themes');
35
+        $this->requireDir(BASE_PATH.'/themes/'.$theme);
36
+        $this->requireDir(BASE_PATH.'/themes/'.$theme.'/templates');
37 37
     }
38 38
 
39 39
     /**
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
         }
52 52
 
53 53
         $this->stepCreateTheme($theme);
54
-        $this->requireFile(BASE_PATH . '/themes/' . $theme . '/templates/' . $template, $content);
54
+        $this->requireFile(BASE_PATH.'/themes/'.$theme.'/templates/'.$template, $content);
55 55
     }
56 56
 
57 57
     protected function requireFile($filename, $content)
Please login to merge, or discard this patch.