PSR2: Automatic fixes

This commit is contained in:
Damian Mooyman 2016-11-29 12:33:28 +13:00
parent 1b1e921e3d
commit 4b7d31377b
No known key found for this signature in database
GPG Key ID: 78B823A10DE27D1A
12 changed files with 73 additions and 59 deletions

View File

@ -409,7 +409,8 @@ class GDBackend extends Object implements Image_Backend, Flushable
case 270:
imagesetpixel($rotate, $destWidth - $y - 1, $x, $color);
break;
default: $rotate = $this->gd;
default:
$rotate = $this->gd;
};
}
}

View File

@ -489,7 +489,7 @@ class Config
return false;
}
static protected function check_key_or_value_contained_in_suppress_array($k, $v, $suppresses)
protected static function check_key_or_value_contained_in_suppress_array($k, $v, $suppresses)
{
foreach ($suppresses as $suppress) {
list($sk, $sv) = $suppress;
@ -500,7 +500,7 @@ class Config
return false;
}
static protected function filter_array_by_suppress_array($array, $suppress)
protected static function filter_array_by_suppress_array($array, $suppress)
{
$res = array();

View File

@ -154,13 +154,16 @@ abstract class Object
case T_STRING:
switch ($token[1]) {
case 'true': $result = true;
case 'true':
$result = true;
break;
case 'false': $result = false;
case 'false':
$result = false;
break;
case 'null': $result = null;
case 'null':
$result = null;
$forceResult = true;
break;

View File

@ -92,19 +92,24 @@ class CliTestReporter extends SapphireTestReporter
{
// Status indicator, a la PHPUnit
switch ($this->currentTest['status']) {
case TEST_FAILURE: echo CLI::text("F", "red", null, true);
case TEST_FAILURE:
echo CLI::text("F", "red", null, true);
break;
case TEST_ERROR: echo CLI::text("E", "red", null, true);
case TEST_ERROR:
echo CLI::text("E", "red", null, true);
break;
case TEST_INCOMPLETE: echo CLI::text("I", "yellow");
case TEST_INCOMPLETE:
echo CLI::text("I", "yellow");
break;
case TEST_SUCCESS: echo CLI::text(".", "green");
case TEST_SUCCESS:
echo CLI::text(".", "green");
break;
default: echo CLI::text("?", "yellow");
default:
echo CLI::text("?", "yellow");
break;
}

View File

@ -452,16 +452,20 @@ class SapphireTestReporter implements PHPUnit_Framework_TestListener
foreach ($suite['tests'] as $test) {
$testCount++;
switch ($test['status']) {
case TEST_ERROR: $errorCount++;
case TEST_ERROR:
$errorCount++;
break;
case TEST_INCOMPLETE: $incompleteCount++;
case TEST_INCOMPLETE:
$incompleteCount++;
break;
case TEST_SUCCESS: $passCount++;
case TEST_SUCCESS:
$passCount++;
break;
case TEST_FAILURE: $failCount++;
case TEST_FAILURE:
$failCount++;
break;
}

View File

@ -331,7 +331,6 @@ abstract class Database
// Switch command type
switch ($writeInfo['command']) {
case "update":
// Build update
$query = new SQLUpdate("\"$table\"", $this->escapeColumnKeys($fieldValues));

View File

@ -405,10 +405,12 @@ class DataList extends ViewableData implements SS_List, Filterable, Sortable, Li
// Validate and process arguments
$arguments = func_get_args();
switch (sizeof($arguments)) {
case 1: $filters = $arguments[0];
case 1:
$filters = $arguments[0];
break;
case 2: $filters = array($arguments[0] => $arguments[1]);
case 2:
$filters = array($arguments[0] => $arguments[1]);
break;
default: