diff --git a/.phpunit.result.cache b/.phpunit.result.cache new file mode 100644 index 0000000..45a0b0d --- /dev/null +++ b/.phpunit.result.cache @@ -0,0 +1 @@ +{"version":1,"defects":{"Gabeta\\GsmDetector\\Test\\GsmDetectorTest::test_is_gsm":4,"Gabeta\\GsmDetector\\Test\\GsmDetectorTest::test_is_gsm_name":4,"Gabeta\\GsmDetector\\Test\\GsmDetectorTest::test_get_gsm_name":4},"times":{"Gabeta\\GsmDetector\\Test\\GsmDetectorTest::test_is_gsm":0.001,"Gabeta\\GsmDetector\\Test\\GsmDetectorTest::test_is_gsm_with_type":0,"Gabeta\\GsmDetector\\Test\\GsmDetectorTest::test_is_gsm_name":0,"Gabeta\\GsmDetector\\Test\\GsmDetectorTest::test_is_gsm_name_with_type":0,"Gabeta\\GsmDetector\\Test\\GsmDetectorTest::test_get_gsm_name":0,"Gabeta\\GsmDetector\\Test\\GsmDetectorTest::test_is_type":0}} \ No newline at end of file diff --git a/src/GsmDetector.php b/src/GsmDetector.php index 81747f1..39ba1cb 100644 --- a/src/GsmDetector.php +++ b/src/GsmDetector.php @@ -83,7 +83,7 @@ public function isGsm($name, $value) { $gsmConfig = self::$config[$name]; - $prefix = call_user_func_array('array_merge', $gsmConfig); + $prefix = call_user_func_array('array_merge', array_values($gsmConfig)); return $this->hasValue($prefix, $value); } @@ -143,7 +143,7 @@ public function isType($value, $type) public function getGsmName($value) { foreach (self::$config as $key => $config) { - $prefix = call_user_func_array('array_merge', $config); + $prefix = call_user_func_array('array_merge', array_values($config)); if ($this->hasValue($prefix, $value)) { return $key;