Completed
Branch master (98859f)
by Christopher
07:46
created
tests/behat/features/bootstrap/Context/FeatureContext.php 2 patches
Unused Use Statements   -3 removed lines patch added patch discarded remove patch
@@ -2,9 +2,6 @@
 block discarded – undo
2 2
 
3 3
 namespace SilverStripe\Siteconfig\Test\Behaviour;
4 4
 
5
-use SilverStripe\BehatExtension\Context\SilverStripeContext;
6
-use SilverStripe\BehatExtension\Context\BasicContext;
7
-use SilverStripe\BehatExtension\Context\LoginContext;
8 5
 use SilverStripe\BehatExtension\Context\FixtureContext;
9 6
 use SilverStripe\Cms\Test\Behaviour;
10 7
 
Please login to merge, or discard this 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.
features/bootstrap/SilverStripe/SiteConfig/Test/Behaviour/ThemeContext.php 1 patch
Unused Use Statements   -8 removed lines patch added patch discarded remove patch
@@ -2,15 +2,7 @@
 block discarded – undo
2 2
 
3 3
 namespace SilverStripe\Siteconfig\Test\Behaviour;
4 4
 
5
-use Behat\Behat\Context\ClosuredContextInterface;
6
-use Behat\Behat\Context\TranslatedContextInterface;
7 5
 use Behat\Behat\Context\BehatContext;
8
-use Behat\Behat\Context\Step;
9
-use Behat\Behat\Event\StepEvent;
10
-use Behat\Behat\Exception\PendingException;
11
-use Behat\Mink\Driver\Selenium2Driver;
12
-use Behat\Gherkin\Node\PyStringNode;
13
-use Behat\Gherkin\Node\TableNode;
14 6
 
15 7
 /**
16 8
  * Context used to create fixtures in the SilverStripe ORM.
Please login to merge, or discard this patch.
code/model/SiteConfig.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -165,7 +165,7 @@
 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.
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.