Skip to content

Commit

Permalink
Minor CS corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
euromark committed Mar 29, 2014
1 parent 8b41afb commit b51ab9f
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/Collection/CollectionTrait.php
Expand Up @@ -84,7 +84,7 @@ public function each(callable $c) {
public function filter(callable $c = null) {
if ($c === null) {
$c = function ($v) {
return !!$v;
return (bool)$v;
};
}
return new FilterIterator($this, $c);
Expand Down
2 changes: 1 addition & 1 deletion src/Database/Driver.php
Expand Up @@ -183,7 +183,7 @@ public abstract function quoteIdentifier($identifier);
* @return string String for use in schema definitions.
*/
public function schemaValue($value) {
if (is_null($value)) {
if ($value === null) {
return 'NULL';
}
if ($value === false) {
Expand Down
2 changes: 1 addition & 1 deletion src/Database/Log/QueryLogger.php
Expand Up @@ -58,7 +58,7 @@ protected function _log($query) {
*/
protected function _interpolate($query) {
$params = array_map(function($p) {
if (is_null($p)) {
if ($p === null) {
return 'NULL';
}
return is_string($p) ? "'$p'" : $p;
Expand Down
4 changes: 2 additions & 2 deletions src/Database/Type.php
Expand Up @@ -175,7 +175,7 @@ public function toPHP($value, Driver $driver) {
* @return mixed
*/
protected function _basicTypeCast($value, Driver $driver) {
if (is_null($value)) {
if ($value === null) {
return null;
}

Expand All @@ -196,7 +196,7 @@ protected function _basicTypeCast($value, Driver $driver) {
* @return mixed
*/
public function toStatement($value, Driver $driver) {
if (is_null($value)) {
if ($value === null) {
return PDO::PARAM_NULL;
}

Expand Down
2 changes: 1 addition & 1 deletion src/Database/Type/UuidType.php
Expand Up @@ -32,7 +32,7 @@ class UuidType extends \Cake\Database\Type {
* @return mixed
*/
public function toStatement($value, Driver $driver) {
if (is_null($value)) {
if ($value === null) {
return PDO::PARAM_NULL;
}
return PDO::PARAM_STR;
Expand Down

0 comments on commit b51ab9f

Please sign in to comment.