mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Merge pull request #1618 from dereuromark/master-cs
Remove last yoda conditions as per coding standards guidelines.
This commit is contained in:
commit
f82814d7ac
5 changed files with 7 additions and 7 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -97,7 +97,7 @@ class CakeHtmlReporter extends CakeBaseReporter {
|
|||
$urlExtra = '&plugin=' . $plugin;
|
||||
}
|
||||
|
||||
if (1 > count($testCases)) {
|
||||
if (count($testCases) < 1) {
|
||||
$buffer .= "<strong>EMPTY</strong>";
|
||||
}
|
||||
|
||||
|
|
|
@ -161,7 +161,7 @@ class CakeTextReporter extends CakeBaseReporter {
|
|||
$urlExtra = '&plugin=' . $plugin;
|
||||
}
|
||||
|
||||
if (1 > count($testCases)) {
|
||||
if (count($testCases) < 1) {
|
||||
$buffer .= 'EMPTY';
|
||||
echo $buffer;
|
||||
}
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue