Merge pull request #4161 from dereuromark/master-cs-equals

CS fixes.
This commit is contained in:
Mark Story 2014-08-04 10:06:41 -04:00
commit 214d278119
5 changed files with 10 additions and 10 deletions

View file

@ -398,7 +398,7 @@ class ExtractTask extends AppShell {
}
list($type, $string, $line) = $countToken;
if (($type == T_STRING) && ($string == $functionName) && ($firstParenthesis === '(')) {
if (($type == T_STRING) && ($string === $functionName) && ($firstParenthesis === '(')) {
$position = $count;
$depth = 0;

View file

@ -2096,7 +2096,7 @@ class CakeEmailTest extends CakeTestCase {
$result['html'] = false;
$length = count($message);
for ($i = 0; $i < $length; ++$i) {
if ($message[$i] == $boundary) {
if ($message[$i] === $boundary) {
$flag = false;
$type = '';
while (!preg_match('/^$/', $message[$i])) {

View file

@ -540,8 +540,8 @@ TEXT;
Debugger::dump($var, 1);
$result = ob_get_clean();
$open = php_sapi_name() == 'cli' ? "\n" : '<pre>';
$close = php_sapi_name() == 'cli' ? "\n" : '</pre>';
$open = php_sapi_name() === 'cli' ? "\n" : '<pre>';
$close = php_sapi_name() === 'cli' ? "\n" : '</pre>';
$expected = <<<TEXT
{$open}array(
'People' => array(

View file

@ -132,21 +132,21 @@ class String {
}
if ($tmpOffset !== -1) {
$buffer .= substr($data, $offset, ($tmpOffset - $offset));
if (!$depth && $data{$tmpOffset} == $separator) {
if (!$depth && $data{$tmpOffset} === $separator) {
$results[] = $buffer;
$buffer = '';
} else {
$buffer .= $data{$tmpOffset};
}
if ($leftBound != $rightBound) {
if ($data{$tmpOffset} == $leftBound) {
if ($leftBound !== $rightBound) {
if ($data{$tmpOffset} === $leftBound) {
$depth++;
}
if ($data{$tmpOffset} == $rightBound) {
if ($data{$tmpOffset} === $rightBound) {
$depth--;
}
} else {
if ($data{$tmpOffset} == $leftBound) {
if ($data{$tmpOffset} === $leftBound) {
if (!$open) {
$depth++;
$open = true;

View file

@ -121,7 +121,7 @@ class CacheHelper extends AppHelper {
$index = null;
foreach ($keys as $action) {
if ($action == $this->request->params['action']) {
if ($action === $this->request->params['action']) {
$index = $action;
break;
}