8000 change to [] !== var comparison · zendframework/zend-stdlib@15e59b3 · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Jan 31, 2020. It is now read-only.

Commit 15e59b3

Browse files
committed
change to [] !== var comparison
1 parent de1dbbf commit 15e59b3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/ArrayUtils.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public static function hasStringKeys($value, $allowEmpty = false)
4747
return $allowEmpty;
4848
}
4949

50-
return ! empty(array_filter(array_keys($value), 'is_string'));
50+
return [] !== array_filter(array_keys($value), 'is_string');
5151
}
5252

5353
/**
@@ -67,7 +67,7 @@ public static function hasIntegerKeys($value, $allowEmpty = false)
6767
return $allowEmpty;
6868
}
6969

70-
return ! empty(array_filter(array_keys($value), 'is_int'));
70+
return [] !== array_filter(array_keys($value), 'is_int');
7171
}
7272

7373
/**
@@ -94,7 +94,7 @@ public static function hasNumericKeys($value, $allowEmpty = false)
9494
return $allowEmpty;
9595
}
9696

97-
return ! empty(array_filter(array_keys($value), 'is_numeric'));
97+
return [] !== array_filter(array_keys($value), 'is_numeric');
9898
}
9999

100100
/**

0 commit comments

Comments
 (0)
0