src/MockHelper.php
private function pullOutArrayValue(array &$array, string $key, $defaultValue = null)
    {
        if (!array_key_exists($key, $array)) {
            return $defaultValue;
        }

        $value = $array[$key];
        unset($array[$key]);

        return $value;
    }
private function pullOutArrayValue(array &$array, string $key, $defaultValue = null)
    {
        if (!array_key_exists($key, $array)) {
            return $defaultValue;
        }

        $value = $array[$key];
        unset($array[$key]);

        return $value;
    }
private function pullOutArrayValue ( array & $ array , string $ key , $ defaultValue = null ) { if ( ! array_key_exists ( $ key , $ array ) ) { return $ defaultValue ; } $ value = $ array [ $ key ] ; unset ( $ array [ $ key ] ) ; return $ value ; }
Returns an array item value and removes it from the array.

@param array $array An array from which the value is pulled out.
@param string $key A key of the array.
@param mixed $defaultValue A default value which will be returned if the specified key doesn't exist in the array.

@return mixed
Returns an array item value and removes it from the array .