diff --git a/dev/BehatFixtureFactory.php b/dev/BehatFixtureFactory.php
index a4f7a829a..f8c98e079 100644
--- a/dev/BehatFixtureFactory.php
+++ b/dev/BehatFixtureFactory.php
@@ -4,20 +4,20 @@
* @subpackage testing
*/
class BehatFixtureFactory extends \FixtureFactory {
- public function createObject($name, $identifier, $data = null) {
- if(!$data) $data = array();
+ public function createObject($name, $identifier, $data = null) {
+ if(!$data) $data = array();
- // Copy identifier to some visible property unless its already defined.
- // Exclude files, since they generate their own named based on the file path.
- if(!$name != 'File' && !is_subclass_of($name, 'File')) {
- foreach(array('Name', 'Title') as $fieldName) {
- if(singleton($name)->hasField($fieldName) && !isset($data[$fieldName])) {
- $data[$fieldName] = $identifier;
- break;
- }
- }
- }
+ // Copy identifier to some visible property unless its already defined.
+ // Exclude files, since they generate their own named based on the file path.
+ if(!$name != 'File' && !is_subclass_of($name, 'File')) {
+ foreach(array('Name', 'Title') as $fieldName) {
+ if(singleton($name)->hasField($fieldName) && !isset($data[$fieldName])) {
+ $data[$fieldName] = $identifier;
+ break;
+ }
+ }
+ }
- return parent::createObject($name, $identifier, $data);
- }
-}
\ No newline at end of file
+ return parent::createObject($name, $identifier, $data);
+ }
+}
diff --git a/forms/CheckboxField.php b/forms/CheckboxField.php
index 7f7bd1d34..ab4fb7d62 100644
--- a/forms/CheckboxField.php
+++ b/forms/CheckboxField.php
@@ -62,7 +62,9 @@ class CheckboxField_Readonly extends ReadonlyField {
}
public function Value() {
- return Convert::raw2xml($this->value ? _t('CheckboxField.YESANSWER', 'Yes') : _t('CheckboxField.NOANSWER', 'No'));
+ return Convert::raw2xml($this->value ?
+ _t('CheckboxField.YESANSWER', 'Yes') :
+ _t('CheckboxField.NOANSWER', 'No'));
}
}
diff --git a/model/Database.php b/model/Database.php
index 598bf988f..699bb9625 100644
--- a/model/Database.php
+++ b/model/Database.php
@@ -1136,7 +1136,7 @@ abstract class SS_Query implements Iterator {
$result .= "
";
foreach($record as $k => $v) {
$result .= "" . Convert::raw2xml($k) . " | ";
- }
+ }
$result .= "
\n";
}
@@ -1213,7 +1213,7 @@ abstract class SS_Query implements Iterator {
*/
public function valid() {
if(!$this->queryHasBegun) $this->next();
- return $this->currentRecord !== false;
+ return $this->currentRecord !== false;
}
/**
diff --git a/model/Hierarchy.php b/model/Hierarchy.php
index 4374d5960..e66d3e727 100644
--- a/model/Hierarchy.php
+++ b/model/Hierarchy.php
@@ -77,8 +77,8 @@ class Hierarchy extends DataExtension {
* @param int $nodeCountThreshold The lower bounds for the amount of nodes to mark. If set, the logic will expand
* nodes until it eaches at least this number, and then stops. Root nodes will always
* show regardless of this settting. Further nodes can be lazy-loaded via ajax.
- * This isn't a hard limit. Example: On a value of 10, with 20 root nodes, each having
- * 30 children, the actual node count will be 50 (all root nodes plus first expanded child).
+ * This isn't a hard limit. Example: On a value of 10, with 20 root nodes, each having 30
+ * children, the actual node count will be 50 (all root nodes plus first expanded child).
*
* @return string
*/
diff --git a/tests/behat/features/bootstrap/FeatureContext.php b/tests/behat/features/bootstrap/FeatureContext.php
index a9c4835d4..bf8568fa3 100644
--- a/tests/behat/features/bootstrap/FeatureContext.php
+++ b/tests/behat/features/bootstrap/FeatureContext.php
@@ -31,7 +31,7 @@ class FeatureContext extends SilverStripeContext
* Initializes context.
* Every scenario gets it's own context object.
*
- * @param array $parameters context parameters (set them up through behat.yml)
+ * @param array $parameters context parameters (set them up through behat.yml)
*/
public function __construct(array $parameters)
{
@@ -47,22 +47,22 @@ class FeatureContext extends SilverStripeContext
$this->useContext('FixtureContext', $fixtureContext);
// Use blueprints to set user name from identifier
- $factory = $fixtureContext->getFixtureFactory();
- $blueprint = \Injector::inst()->create('FixtureBlueprint', 'Member');
- $blueprint->addCallback('beforeCreate', function($identifier, &$data, &$fixtures) {
- if(!isset($data['FirstName'])) $data['FirstName'] = $identifier;
- });
- $factory->define('Member', $blueprint);
+ $factory = $fixtureContext->getFixtureFactory();
+ $blueprint = \Injector::inst()->create('FixtureBlueprint', 'Member');
+ $blueprint->addCallback('beforeCreate', function($identifier, &$data, &$fixtures) {
+ if(!isset($data['FirstName'])) $data['FirstName'] = $identifier;
+ });
+ $factory->define('Member', $blueprint);
}
public function setMinkParameters(array $parameters)
- {
- parent::setMinkParameters($parameters);
-
- if(isset($parameters['files_path'])) {
- $this->getSubcontext('FixtureContext')->setFilesPath($parameters['files_path']);
- }
- }
+ {
+ parent::setMinkParameters($parameters);
+
+ if(isset($parameters['files_path'])) {
+ $this->getSubcontext('FixtureContext')->setFilesPath($parameters['files_path']);
+ }
+ }
/**
* @return FixtureFactory
diff --git a/tests/control/HTTPTest.php b/tests/control/HTTPTest.php
index 7cc962c70..bd4a00c06 100644
--- a/tests/control/HTTPTest.php
+++ b/tests/control/HTTPTest.php
@@ -130,7 +130,8 @@ class HTTPTest extends SapphireTest {
// background-image
// Note that using /./ in urls is absolutely acceptable
$test->assertEquals(
- 'Content
',
+ ''.
+ 'Content
',
HTTP::absoluteURLs('Content
')
);
@@ -169,7 +170,8 @@ class HTTPTest extends SapphireTest {
// background
// Note that using /./ in urls is absolutely acceptable
$test->assertEquals(
- 'SS Blog
',
+ ''.
+ 'SS Blog
',
HTTP::absoluteURLs('SS Blog
')
);
diff --git a/tests/core/CoreTest.php b/tests/core/CoreTest.php
index 73e10ffa5..b8eb66cb9 100644
--- a/tests/core/CoreTest.php
+++ b/tests/core/CoreTest.php
@@ -22,11 +22,13 @@ class CoreTest extends SapphireTest {
$user = getTempFolderUsername();
// A typical Windows location for where sites are stored on IIS
- $this->assertEquals(sys_get_temp_dir() . '/silverstripe-cacheC--inetpub-wwwroot-silverstripe-test-project/' . $user,
+ $this->assertEquals(sys_get_temp_dir() .
+ '/silverstripe-cacheC--inetpub-wwwroot-silverstripe-test-project/' . $user,
getTempFolder('C:\\inetpub\\wwwroot\\silverstripe-test-project'));
// A typical Mac OS X location for where sites are stored
- $this->assertEquals(sys_get_temp_dir() . '/silverstripe-cache-Users-joebloggs-Sites-silverstripe-test-project/' . $user,
+ $this->assertEquals(sys_get_temp_dir() .
+ '/silverstripe-cache-Users-joebloggs-Sites-silverstripe-test-project/' . $user,
getTempFolder('/Users/joebloggs/Sites/silverstripe-test-project'));
// A typical Linux location for where sites are stored