@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | |
16 | 16 | if (! function_exists('array_get')) |
17 | 17 | { |
18 | - /* |
|
18 | + /* |
|
19 | 19 | * |
20 | 20 | * @param array $data |
21 | 21 | * @param string $key |
@@ -23,12 +23,12 @@ discard block |
||
23 | 23 | * |
24 | 24 | * @return mixed |
25 | 25 | */ |
26 | - function array_get($data, $key, $default = false) { |
|
27 | - if (!is_array($data)) { |
|
28 | - return $default; |
|
29 | - } |
|
30 | - return isset($data[$key]) ? $data[$key]: $default; |
|
31 | - } |
|
26 | + function array_get($data, $key, $default = false) { |
|
27 | + if (!is_array($data)) { |
|
28 | + return $default; |
|
29 | + } |
|
30 | + return isset($data[$key]) ? $data[$key]: $default; |
|
31 | + } |
|
32 | 32 | } |
33 | 33 | |
34 | 34 | if(!function_exists('array_keys_exist')){ |
@@ -57,6 +57,6 @@ discard block |
||
57 | 57 | } |
58 | 58 | |
59 | 59 | function cleanResponse($response){ |
60 | - $result = $response->getBody(); |
|
61 | - return $result; |
|
60 | + $result = $response->getBody(); |
|
61 | + return $result; |
|
62 | 62 | } |
63 | 63 | \ No newline at end of file |
@@ -13,7 +13,7 @@ discard block |
||
13 | 13 | |
14 | 14 | use \Exception as phpException; |
15 | 15 | |
16 | -if (! function_exists('array_get')) |
|
16 | +if (!function_exists('array_get')) |
|
17 | 17 | { |
18 | 18 | /* |
19 | 19 | * |
@@ -27,11 +27,11 @@ discard block |
||
27 | 27 | if (!is_array($data)) { |
28 | 28 | return $default; |
29 | 29 | } |
30 | - return isset($data[$key]) ? $data[$key]: $default; |
|
30 | + return isset($data[$key]) ? $data[$key] : $default; |
|
31 | 31 | } |
32 | 32 | } |
33 | 33 | |
34 | -if(!function_exists('array_keys_exist')){ |
|
34 | +if (!function_exists('array_keys_exist')) { |
|
35 | 35 | /** |
36 | 36 | * Checks if multiple keys exist in an array |
37 | 37 | * |
@@ -40,23 +40,23 @@ discard block |
||
40 | 40 | * |
41 | 41 | * @return bool |
42 | 42 | */ |
43 | - function array_keys_exist( array $array, $keys ) { |
|
43 | + function array_keys_exist(array $array, $keys) { |
|
44 | 44 | $count = 0; |
45 | - if ( ! is_array( $keys ) ) { |
|
45 | + if (!is_array($keys)) { |
|
46 | 46 | $keys = func_get_args(); |
47 | - array_shift( $keys ); |
|
47 | + array_shift($keys); |
|
48 | 48 | } |
49 | - foreach ( $keys as $key ) { |
|
50 | - if ( array_key_exists( $key, $array ) ) { |
|
51 | - $count ++; |
|
49 | + foreach ($keys as $key) { |
|
50 | + if (array_key_exists($key, $array)) { |
|
51 | + $count++; |
|
52 | 52 | } |
53 | 53 | } |
54 | 54 | |
55 | - return count( $keys ) === $count; |
|
55 | + return count($keys) === $count; |
|
56 | 56 | } |
57 | 57 | } |
58 | 58 | |
59 | -function cleanResponse($response){ |
|
59 | +function cleanResponse($response) { |
|
60 | 60 | $result = $response->getBody(); |
61 | 61 | return $result; |
62 | 62 | } |
63 | 63 | \ No newline at end of file |