Skip to content

Commit

Permalink
CS fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
euromark committed Aug 4, 2014
1 parent 4e168ca commit 9ef7b57
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion lib/Cake/Console/Command/Task/ExtractTask.php
Expand Up @@ -398,7 +398,7 @@ protected function _parse($functionName, $map) {
}

list($type, $string, $line) = $countToken;
if (($type == T_STRING) && ($string == $functionName) && ($firstParenthesis === '(')) {
if (($type == T_STRING) && ($string === $functionName) && ($firstParenthesis === '(')) {
$position = $count;
$depth = 0;

Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Test/Case/Network/Email/CakeEmailTest.php
Expand Up @@ -2096,7 +2096,7 @@ protected function _checkContentTransferEncoding($message, $charset) {
$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])) {
Expand Down
4 changes: 2 additions & 2 deletions lib/Cake/Test/Case/Utility/DebuggerTest.php
Expand Up @@ -540,8 +540,8 @@ public function testDump() {
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(
Expand Down
10 changes: 5 additions & 5 deletions lib/Cake/Utility/String.php
Expand Up @@ -132,21 +132,21 @@ public static function tokenize($data, $separator = ',', $leftBound = '(', $righ
}
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;
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/View/Helper/CacheHelper.php
Expand Up @@ -121,7 +121,7 @@ public function cache($file, $out) {
$index = null;

foreach ($keys as $action) {
if ($action == $this->request->params['action']) {
if ($action === $this->request->params['action']) {
$index = $action;
break;
}
Expand Down

0 comments on commit 9ef7b57

Please sign in to comment.