Skip to content

Commit 480ca46

Browse files
committed
Update SimpleArrayLibrary.php
-Renamed some arguments to follow naming convention
1 parent 48b9d6b commit 480ca46

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

src/SimpleArrayLibrary.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,17 +38,17 @@ public static function addConfigRow(array $config, array $keys, $value)
3838
*
3939
* @return boolean
4040
*/
41-
public static function allElementsEqual(array $array, $value = null)
41+
public static function allElementsEqual(array $haystack, $needle = null)
4242
{
4343
$return = true;
4444
// if both arguments have been passed, use value argument (regardless of whether it is null or not
4545
if (func_num_args() == 2) {
46-
$compareAgainst = $value;
46+
$compareAgainst = $needle;
4747
} // only one argument has been passed, so compare elements only to each other
4848
else {
49-
$compareAgainst = reset($array);
49+
$compareAgainst = reset($haystack);
5050
}
51-
foreach ($array as $element) {
51+
foreach ($haystack as $element) {
5252
if ($compareAgainst != $element) {
5353
$return = false;
5454
break;
@@ -490,4 +490,4 @@ public static function setColumn(array $matrix, $column, $value, $insertIfMissin
490490

491491
return $matrix;
492492
}
493-
}
493+
}

0 commit comments

Comments
 (0)