Merge pull request #1618 from dereuromark/master-cs

Remove last yoda conditions as per coding standards guidelines.
This commit is contained in:
Mark Story 2013-09-06 11:11:24 -07:00
commit f82814d7ac
5 changed files with 7 additions and 7 deletions

View file

@ -952,14 +952,14 @@ class DboSource extends DataSource {
if ($quote) {
if ($schema && !empty($schemaName)) {
if (false == strstr($table, '.')) {
if (strstr($table, '.') === false) {
return $this->name($schemaName) . '.' . $this->name($table);
}
}
return $this->name($table);
}
if ($schema && !empty($schemaName)) {
if (false == strstr($table, '.')) {
if (strstr($table, '.') === false) {
return $schemaName . '.' . $table;
}
}
@ -1065,7 +1065,7 @@ class DboSource extends DataSource {
if ($bypass) {
$assocData['fields'] = false;
}
if (true === $this->generateAssociationQuery($model, $linkModel, $type, $assoc, $assocData, $queryData, $external, $null)) {
if ($this->generateAssociationQuery($model, $linkModel, $type, $assoc, $assocData, $queryData, $external, $null) === true) {
$linkedModels[$type . '/' . $assoc] = true;
}
}

View file

@ -610,7 +610,7 @@ class RssHelperTest extends CakeTestCase {
$this->assertTrue($File->write('123'), 'Could not write to ' . $tmpFile);
if (50300 <= PHP_VERSION_ID) {
if (PHP_VERSION_ID >= 50300) {
clearstatcache(true, $tmpFile);
} else {
clearstatcache();

View file

@ -97,7 +97,7 @@ class CakeHtmlReporter extends CakeBaseReporter {
$urlExtra = '&plugin=' . $plugin;
}
if (1 > count($testCases)) {
if (count($testCases) < 1) {
$buffer .= "<strong>EMPTY</strong>";
}

View file

@ -161,7 +161,7 @@ class CakeTextReporter extends CakeBaseReporter {
$urlExtra = '&plugin=' . $plugin;
}
if (1 > count($testCases)) {
if (count($testCases) < 1) {
$buffer .= 'EMPTY';
echo $buffer;
}

View file

@ -591,7 +591,7 @@ class Set {
}
}
return $tmp;
} elseif (false !== strpos($key, '{') && false !== strpos($key, '}')) {
} elseif (strpos($key, '{') !== false && strpos($key, '}') !== false) {
$pattern = substr($key, 1, -1);
foreach ($data as $j => $val) {