Skip to content

Commit b51ab9f

Browse files
author
euromark
committed
Minor CS corrections
1 parent 8b41afb commit b51ab9f

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

src/Collection/CollectionTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public function each(callable $c) {
8484
public function filter(callable $c = null) {
8585
if ($c === null) {
8686
$c = function ($v) {
87-
return !!$v;
87+
return (bool)$v;
8888
};
8989
}
9090
return new FilterIterator($this, $c);

src/Database/Driver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ public abstract function quoteIdentifier($identifier);
183183
* @return string String for use in schema definitions.
184184
*/
185185
public function schemaValue($value) {
186-
if (is_null($value)) {
186+
if ($value === null) {
187187
return 'NULL';
188188
}
189189
if ($value === false) {

src/Database/Log/QueryLogger.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ protected function _log($query) {
5858
*/
5959
protected function _interpolate($query) {
6060
$params = array_map(function($p) {
61-
if (is_null($p)) {
61+
if ($p === null) {
6262
return 'NULL';
6363
}
6464
return is_string($p) ? "'$p'" : $p;

src/Database/Type.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ public function toPHP($value, Driver $driver) {
175175
* @return mixed
176176
*/
177177
protected function _basicTypeCast($value, Driver $driver) {
178-
if (is_null($value)) {
178+
if ($value === null) {
179179
return null;
180180
}
181181

@@ -196,7 +196,7 @@ protected function _basicTypeCast($value, Driver $driver) {
196196
* @return mixed
197197
*/
198198
public function toStatement($value, Driver $driver) {
199-
if (is_null($value)) {
199+
if ($value === null) {
200200
return PDO::PARAM_NULL;
201201
}
202202

src/Database/Type/UuidType.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class UuidType extends \Cake\Database\Type {
3232
* @return mixed
3333
*/
3434
public function toStatement($value, Driver $driver) {
35-
if (is_null($value)) {
35+
if ($value === null) {
3636
return PDO::PARAM_NULL;
3737
}
3838
return PDO::PARAM_STR;

0 commit comments

Comments
 (0)