@@ -50,8 +50,7 @@ |
||
| 50 | 50 | * @class ConfigurationInterface |
| 51 | 51 | * @package Platine\Stdlib\Contract |
| 52 | 52 | */ |
| 53 | -interface ConfigurationInterface |
|
| 54 | -{ |
|
| 53 | +interface ConfigurationInterface { |
|
| 55 | 54 | /** |
| 56 | 55 | * Create new instance |
| 57 | 56 | * @param array<string, mixed> $config |
@@ -50,8 +50,7 @@ |
||
| 50 | 50 | * @class Jsonable |
| 51 | 51 | * @package Platine\Stdlib\Contract |
| 52 | 52 | */ |
| 53 | -interface Jsonable |
|
| 54 | -{ |
|
| 53 | +interface Jsonable { |
|
| 55 | 54 | /** |
| 56 | 55 | * Convert the instance to JSON string |
| 57 | 56 | * @param int $options |
@@ -50,8 +50,7 @@ |
||
| 50 | 50 | * @class Arrayable |
| 51 | 51 | * @package Platine\Stdlib\Contract |
| 52 | 52 | */ |
| 53 | -interface Arrayable |
|
| 54 | -{ |
|
| 53 | +interface Arrayable { |
|
| 55 | 54 | /** |
| 56 | 55 | * Convert the instance to array |
| 57 | 56 | * @return array<mixed> |
@@ -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 | * The raw configuration array |
| 63 | 62 | * @var array<string, mixed> |
@@ -67,8 +66,7 @@ discard block |
||
| 67 | 66 | /** |
| 68 | 67 | * {@inheritedoc} |
| 69 | 68 | */ |
| 70 | - public function __construct(array $config = []) |
|
| 71 | - { |
|
| 69 | + public function __construct(array $config = []) { |
|
| 72 | 70 | $configuration = array_merge($this->getDefault(), $config); |
| 73 | 71 | $this->load($configuration); |
| 74 | 72 | } |
@@ -57,8 +57,7 @@ |
||
| 57 | 57 | * @class Str |
| 58 | 58 | * @package Platine\Stdlib\Helper |
| 59 | 59 | */ |
| 60 | -class Str |
|
| 61 | -{ |
|
| 60 | +class Str { |
|
| 62 | 61 | /** |
| 63 | 62 | * The cache of snake-cased words. |
| 64 | 63 | * |
@@ -53,8 +53,7 @@ |
||
| 53 | 53 | * @class Composer |
| 54 | 54 | * @package Platine\Stdlib\Helper |
| 55 | 55 | */ |
| 56 | -class Composer |
|
| 57 | -{ |
|
| 56 | +class Composer { |
|
| 58 | 57 | /** |
| 59 | 58 | * The composer class loader instance |
| 60 | 59 | * @var ClassLoader|null |
@@ -52,8 +52,7 @@ discard block |
||
| 52 | 52 | * @class Php |
| 53 | 53 | * @package Platine\Stdlib\Helper |
| 54 | 54 | */ |
| 55 | -class Php |
|
| 56 | -{ |
|
| 55 | +class Php { |
|
| 57 | 56 | /** |
| 58 | 57 | * Call by callback |
| 59 | 58 | * @param callable|array<mixed> $callback |
@@ -67,7 +66,8 @@ discard block |
||
| 67 | 66 | // className::method |
| 68 | 67 | if (strpos($callback, '::') > 0) { |
| 69 | 68 | $callback = explode('::', $callback, 2); |
| 70 | - } elseif (function_exists($callback)) { //function |
|
| 69 | + } elseif (function_exists($callback)) { |
|
| 70 | +//function |
|
| 71 | 71 | return $callback(...$args); |
| 72 | 72 | } |
| 73 | 73 | } elseif (is_object($callback) && method_exists($callback, '__invoke')) { |
@@ -50,8 +50,7 @@ |
||
| 50 | 50 | * @class Unit |
| 51 | 51 | * @package Platine\Stdlib\Helper |
| 52 | 52 | */ |
| 53 | -class Unit |
|
| 54 | -{ |
|
| 53 | +class Unit { |
|
| 55 | 54 | /** |
| 56 | 55 | * Convert the size like 4G, 7T, 19B to byte |
| 57 | 56 | * @param string $size |
@@ -50,8 +50,7 @@ |
||
| 50 | 50 | * @class Xml |
| 51 | 51 | * @package Platine\Stdlib\Helper |
| 52 | 52 | */ |
| 53 | -class Xml |
|
| 54 | -{ |
|
| 53 | +class Xml { |
|
| 55 | 54 | /** |
| 56 | 55 | * Transform an XML string to array |
| 57 | 56 | * @param string $xml |