Completed
Push — master ( 3c4b6a...d139bf )
by Sam
02:03
created
features/bootstrap/SilverStripe/SiteConfig/Test/Behaviour/ThemeContext.php 2 patches
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -54,6 +54,9 @@  discard block
 block discarded – undo
54 54
         $this->requireFile(BASE_PATH . '/themes/' . $theme . '/templates/' . $template, $content);
55 55
     }
56 56
 
57
+    /**
58
+     * @param string $filename
59
+     */
57 60
     protected function requireFile($filename, $content)
58 61
     {
59 62
         // Already exists
@@ -71,6 +74,9 @@  discard block
 block discarded – undo
71 74
         }
72 75
     }
73 76
 
77
+    /**
78
+     * @param string $dirname
79
+     */
74 80
     protected function requireDir($dirname)
75 81
     {
76 82
         // Directory doesn't exist, create it and mark it for deletion
Please login to merge, or discard this 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.
code/SiteConfig.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -242,7 +242,7 @@
 block discarded – undo
242 242
      * Can a user view this SiteConfig instance?
243 243
      *
244 244
      * @param Member $member
245
-     * @return boolean
245
+     * @return boolean|string
246 246
      */
247 247
     public function canView($member = null)
248 248
     {
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -148,9 +148,9 @@
 block discarded – undo
148 148
             $fields->makeFieldReadonly($titleField);
149 149
         }
150 150
 
151
-        if (file_exists(BASE_PATH . '/install.php')) {
151
+        if (file_exists(BASE_PATH.'/install.php')) {
152 152
             $fields->addFieldToTab("Root.Main", new LiteralField("InstallWarningHeader",
153
-                "<p class=\"message warning\">" . _t("SiteTree.REMOVE_INSTALL_WARNING",
153
+                "<p class=\"message warning\">"._t("SiteTree.REMOVE_INSTALL_WARNING",
154 154
                 "Warning: You should remove install.php from this SilverStripe install for security reasons.")
155 155
                 . "</p>"), "Title");
156 156
         }
Please login to merge, or discard this patch.
code/SiteConfigLeftAndMain.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -134,7 +134,7 @@
 block discarded – undo
134 134
 	 *
135 135
 	 * @param array $data
136 136
 	 * @param Form $form
137
-	 * @return String
137
+	 * @return \SilverStripe\ORM\FieldType\DBHTMLText
138 138
 	 */
139 139
     public function save_siteconfig($data, $form)
140 140
     {
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 	public function init() {
58 58
 		parent::init();
59 59
         if (defined('CMS_DIR')) {
60
-            Requirements::javascript(CMS_DIR . '/client/dist/js/bundle.js');
60
+            Requirements::javascript(CMS_DIR.'/client/dist/js/bundle.js');
61 61
         }
62 62
 	}
63 63
 
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
 		)->setHTMLID('Form_EditForm');
97 97
 		$form->setValidationResponseCallback(function(ValidationResult $errors) use ($negotiator, $form) {
98 98
 			$request = $this->getRequest();
99
-			if($request->isAjax() && $negotiator) {
99
+			if ($request->isAjax() && $negotiator) {
100 100
 				$result = $form->forTemplate();
101 101
 				return $negotiator->respond($request, array(
102 102
 					'CurrentForm' => function() use($result) {
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
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 
37 37
         // Add extra contexts with more steps
38 38
         $this->useContext('ThemeContext', new \SilverStripe\Siteconfig\Test\Behaviour\ThemeContext($parameters));
39
-        if(!class_exists('SilverStripe\\CMS\\Model\\SiteTree')) {
39
+        if (!class_exists('SilverStripe\\CMS\\Model\\SiteTree')) {
40 40
             return;
41 41
         }
42 42
 
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
         $factory = $fixtureContext->getFixtureFactory();
45 45
         foreach (ClassInfo::subclassesFor('SilverStripe\\CMS\\Model\\SiteTree') as $id => $class) {
46 46
             $blueprint = Injector::inst()->create('SilverStripe\\Dev\\FixtureBlueprint', $class);
47
-            $blueprint->addCallback('afterCreate', function ($obj, $identifier, &$data, &$fixtures) {
47
+            $blueprint->addCallback('afterCreate', function($obj, $identifier, &$data, &$fixtures) {
48 48
                 $obj->publish('Stage', 'Live');
49 49
             });
50 50
             $factory->define($class, $blueprint);
Please login to merge, or discard this patch.