@@ -52,8 +52,7 @@ |
||
52 | 52 | * Class Json |
53 | 53 | * @package Platine\Stdlib\Helper |
54 | 54 | */ |
55 | -class Json |
|
56 | -{ |
|
55 | +class Json { |
|
57 | 56 | |
58 | 57 | /** |
59 | 58 | * Decode JSON string |
@@ -57,8 +57,7 @@ discard block |
||
57 | 57 | * Class Arr |
58 | 58 | * @package Platine\Stdlib\Helper |
59 | 59 | */ |
60 | -class Arr |
|
61 | -{ |
|
60 | +class Arr { |
|
62 | 61 | |
63 | 62 | /** |
64 | 63 | * Convert an array, object or string to array |
@@ -159,8 +158,7 @@ discard block |
||
159 | 158 | * @return mixed If the key does not exist in the array or object, |
160 | 159 | * the default value will be returned instead. |
161 | 160 | */ |
162 | - public static function getValue($object, $key, $default = null) |
|
163 | - { |
|
161 | + public static function getValue($object, $key, $default = null) { |
|
164 | 162 | if ($key instanceof Closure) { |
165 | 163 | return $key($object, $default); |
166 | 164 | } |
@@ -220,8 +218,7 @@ discard block |
||
220 | 218 | * |
221 | 219 | * @return mixed|null |
222 | 220 | */ |
223 | - public static function remove(array &$array, $key, $default = null) |
|
224 | - { |
|
221 | + public static function remove(array &$array, $key, $default = null) { |
|
225 | 222 | if (isset($array[$key]) || array_key_exists($key, $array)) { |
226 | 223 | $value = $array[$key]; |
227 | 224 | |
@@ -296,8 +293,7 @@ discard block |
||
296 | 293 | * @param mixed $default |
297 | 294 | * @return mixed |
298 | 295 | */ |
299 | - public static function pull(array &$array, $key, $default = null) |
|
300 | - { |
|
296 | + public static function pull(array &$array, $key, $default = null) { |
|
301 | 297 | $value = static::get($array, $key, $default); |
302 | 298 | |
303 | 299 | static::forget($array, $key); |
@@ -756,8 +752,7 @@ discard block |
||
756 | 752 | * @param mixed $default |
757 | 753 | * @return mixed |
758 | 754 | */ |
759 | - public static function get($array, $key = null, $default = null) |
|
760 | - { |
|
755 | + public static function get($array, $key = null, $default = null) { |
|
761 | 756 | if ($key === null) { |
762 | 757 | return $array; |
763 | 758 | } |
@@ -1137,8 +1132,7 @@ discard block |
||
1137 | 1132 | * |
1138 | 1133 | * @return mixed |
1139 | 1134 | */ |
1140 | - public static function random(array $array, ?int $number = null) |
|
1141 | - { |
|
1135 | + public static function random(array $array, ?int $number = null) { |
|
1142 | 1136 | $requested = $number === null ? 1 : $number; |
1143 | 1137 | $count = count($array); |
1144 | 1138 |
@@ -56,8 +56,7 @@ discard block |
||
56 | 56 | * Class AbstractConfiguration |
57 | 57 | * @package Platine\Stdlib\Config |
58 | 58 | */ |
59 | -abstract class AbstractConfiguration implements ConfigurationInterface |
|
60 | -{ |
|
59 | +abstract class AbstractConfiguration implements ConfigurationInterface { |
|
61 | 60 | |
62 | 61 | /** |
63 | 62 | * The raw configuration array |
@@ -68,16 +67,14 @@ discard block |
||
68 | 67 | /** |
69 | 68 | * {@inheritedoc} |
70 | 69 | */ |
71 | - public function __construct(array $config = []) |
|
72 | - { |
|
70 | + public function __construct(array $config = []) { |
|
73 | 71 | $this->load($config); |
74 | 72 | } |
75 | 73 | |
76 | 74 | /** |
77 | 75 | * {@inheritedoc} |
78 | 76 | */ |
79 | - public function get(string $name) |
|
80 | - { |
|
77 | + public function get(string $name) { |
|
81 | 78 | if (!$this->has($name)) { |
82 | 79 | throw new InvalidArgumentException(sprintf( |
83 | 80 | 'Configuration [%s] does not exist', |