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 ($quote) {
|
||||||
if ($schema && !empty($schemaName)) {
|
if ($schema && !empty($schemaName)) {
|
||||||
if (false == strstr($table, '.')) {
|
if (strstr($table, '.') === false) {
|
||||||
return $this->name($schemaName) . '.' . $this->name($table);
|
return $this->name($schemaName) . '.' . $this->name($table);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return $this->name($table);
|
return $this->name($table);
|
||||||
}
|
}
|
||||||
if ($schema && !empty($schemaName)) {
|
if ($schema && !empty($schemaName)) {
|
||||||
if (false == strstr($table, '.')) {
|
if (strstr($table, '.') === false) {
|
||||||
return $schemaName . '.' . $table;
|
return $schemaName . '.' . $table;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1065,7 +1065,7 @@ class DboSource extends DataSource {
|
||||||
if ($bypass) {
|
if ($bypass) {
|
||||||
$assocData['fields'] = false;
|
$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;
|
$linkedModels[$type . '/' . $assoc] = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -610,7 +610,7 @@ class RssHelperTest extends CakeTestCase {
|
||||||
|
|
||||||
$this->assertTrue($File->write('123'), 'Could not write to ' . $tmpFile);
|
$this->assertTrue($File->write('123'), 'Could not write to ' . $tmpFile);
|
||||||
|
|
||||||
if (50300 <= PHP_VERSION_ID) {
|
if (PHP_VERSION_ID >= 50300) {
|
||||||
clearstatcache(true, $tmpFile);
|
clearstatcache(true, $tmpFile);
|
||||||
} else {
|
} else {
|
||||||
clearstatcache();
|
clearstatcache();
|
||||||
|
|
|
@ -97,7 +97,7 @@ class CakeHtmlReporter extends CakeBaseReporter {
|
||||||
$urlExtra = '&plugin=' . $plugin;
|
$urlExtra = '&plugin=' . $plugin;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (1 > count($testCases)) {
|
if (count($testCases) < 1) {
|
||||||
$buffer .= "<strong>EMPTY</strong>";
|
$buffer .= "<strong>EMPTY</strong>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -161,7 +161,7 @@ class CakeTextReporter extends CakeBaseReporter {
|
||||||
$urlExtra = '&plugin=' . $plugin;
|
$urlExtra = '&plugin=' . $plugin;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (1 > count($testCases)) {
|
if (count($testCases) < 1) {
|
||||||
$buffer .= 'EMPTY';
|
$buffer .= 'EMPTY';
|
||||||
echo $buffer;
|
echo $buffer;
|
||||||
}
|
}
|
||||||
|
|
|
@ -591,7 +591,7 @@ class Set {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return $tmp;
|
return $tmp;
|
||||||
} elseif (false !== strpos($key, '{') && false !== strpos($key, '}')) {
|
} elseif (strpos($key, '{') !== false && strpos($key, '}') !== false) {
|
||||||
$pattern = substr($key, 1, -1);
|
$pattern = substr($key, 1, -1);
|
||||||
|
|
||||||
foreach ($data as $j => $val) {
|
foreach ($data as $j => $val) {
|
||||||
|
|
Loading…
Reference in a new issue