From 959988cfa18f436daf051fb6e4ccb846572cd34b Mon Sep 17 00:00:00 2001 From: euromark Date: Fri, 6 Sep 2013 18:36:57 +0200 Subject: [PATCH] Remove last yoda conditions as per coding standards guidelines. --- lib/Cake/Model/Datasource/DboSource.php | 6 +++--- lib/Cake/Test/Case/View/Helper/RssHelperTest.php | 2 +- lib/Cake/TestSuite/Reporter/CakeHtmlReporter.php | 2 +- lib/Cake/TestSuite/Reporter/CakeTextReporter.php | 2 +- lib/Cake/Utility/Set.php | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/Cake/Model/Datasource/DboSource.php b/lib/Cake/Model/Datasource/DboSource.php index a7859ee04..51927be30 100644 --- a/lib/Cake/Model/Datasource/DboSource.php +++ b/lib/Cake/Model/Datasource/DboSource.php @@ -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; } } diff --git a/lib/Cake/Test/Case/View/Helper/RssHelperTest.php b/lib/Cake/Test/Case/View/Helper/RssHelperTest.php index 36f8bf4ad..4f1e142a5 100644 --- a/lib/Cake/Test/Case/View/Helper/RssHelperTest.php +++ b/lib/Cake/Test/Case/View/Helper/RssHelperTest.php @@ -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(); diff --git a/lib/Cake/TestSuite/Reporter/CakeHtmlReporter.php b/lib/Cake/TestSuite/Reporter/CakeHtmlReporter.php index c226790b5..ad3daa9d6 100644 --- a/lib/Cake/TestSuite/Reporter/CakeHtmlReporter.php +++ b/lib/Cake/TestSuite/Reporter/CakeHtmlReporter.php @@ -97,7 +97,7 @@ class CakeHtmlReporter extends CakeBaseReporter { $urlExtra = '&plugin=' . $plugin; } - if (1 > count($testCases)) { + if (count($testCases) < 1) { $buffer .= "EMPTY"; } diff --git a/lib/Cake/TestSuite/Reporter/CakeTextReporter.php b/lib/Cake/TestSuite/Reporter/CakeTextReporter.php index a1c20adde..bb006537e 100644 --- a/lib/Cake/TestSuite/Reporter/CakeTextReporter.php +++ b/lib/Cake/TestSuite/Reporter/CakeTextReporter.php @@ -161,7 +161,7 @@ class CakeTextReporter extends CakeBaseReporter { $urlExtra = '&plugin=' . $plugin; } - if (1 > count($testCases)) { + if (count($testCases) < 1) { $buffer .= 'EMPTY'; echo $buffer; } diff --git a/lib/Cake/Utility/Set.php b/lib/Cake/Utility/Set.php index 23879f2a6..09aa4a1c3 100644 --- a/lib/Cake/Utility/Set.php +++ b/lib/Cake/Utility/Set.php @@ -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) {