@@ -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 | /**  | 
                                                        
| 57 | 56 | * Convert the instance to JSON string  | 
                                                        
@@ -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 | /**  | 
                                                        
| 57 | 56 | * Convert the instance to array  | 
                                                        
@@ -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 | /**  | 
                                                        
| 57 | 56 | * Create new instance  | 
                                                        
@@ -52,8 +52,7 @@  | 
                                                    ||
| 52 | 52 | * Class Path  | 
                                                        
| 53 | 53 | * @package Platine\Stdlib\Helper  | 
                                                        
| 54 | 54 | */  | 
                                                        
| 55 | -class Path  | 
                                                        |
| 56 | -{ | 
                                                        |
| 55 | +class Path { | 
                                                        |
| 57 | 56 | |
| 58 | 57 | /**  | 
                                                        
| 59 | 58 | * normalize the path by replace the "\" to "/"  | 
                                                        
@@ -50,8 +50,7 @@  | 
                                                    ||
| 50 | 50 | * Class Env  | 
                                                        
| 51 | 51 | * @package Platine\Stdlib\Helper  | 
                                                        
| 52 | 52 | */  | 
                                                        
| 53 | -class Env  | 
                                                        |
| 54 | -{ | 
                                                        |
| 53 | +class Env { | 
                                                        |
| 55 | 54 | |
| 56 | 55 | /**  | 
                                                        
| 57 | 56 | * Whether the application is running on CLI  | 
                                                        
@@ -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 | /**  | 
                                                        
| 57 | 56 | * Transform an XML string to array  | 
                                                        
@@ -74,7 +74,7 @@  | 
                                                    ||
| 74 | 74 | return self::$classLoader;  | 
                                                        
| 75 | 75 | }  | 
                                                        
| 76 | 76 | |
| 77 | - $autoloadFunctions = (array)spl_autoload_functions();  | 
                                                        |
| 77 | + $autoloadFunctions = (array) spl_autoload_functions();  | 
                                                        |
| 78 | 78 |          foreach ($autoloadFunctions as $loader) { | 
                                                        
| 79 | 79 |              if (is_array($loader) && isset($loader[0])) { | 
                                                        
| 80 | 80 | $composerLoader = $loader[0];  | 
                                                        
@@ -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 | /**  | 
                                                        
| 60 | 59 | * The composer class loader instance  | 
                                                        
@@ -67,7 +67,7 @@  | 
                                                    ||
| 67 | 67 |          if (array_key_exists('unit', $matches)) { | 
                                                        
| 68 | 68 | $unit = strtoupper($matches['unit']);  | 
                                                        
| 69 | 69 | }  | 
                                                        
| 70 | - return (int)(floatval($matches['size']) * pow(1024, $units[$unit]));  | 
                                                        |
| 70 | + return (int) (floatval($matches['size']) * pow(1024, $units[$unit]));  | 
                                                        |
| 71 | 71 | }  | 
                                                        
| 72 | 72 | |
| 73 | 73 | /**  | 
                                                        
@@ -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 | /**  | 
                                                        
| 57 | 56 | * Convert the size like 4G, 7T, 19B to byte  | 
                                                        
@@ -85,7 +85,7 @@ discard block  | 
                                                    ||
| 85 | 85 | $value = str_replace($val, $key, $value);  | 
                                                        
| 86 | 86 | }  | 
                                                        
| 87 | 87 | |
| 88 | -        return (string)preg_replace('/[^\x20-\x7E]/u', '', $value); | 
                                                        |
| 88 | +        return (string) preg_replace('/[^\x20-\x7E]/u', '', $value); | 
                                                        |
| 89 | 89 | }  | 
                                                        
| 90 | 90 | |
| 91 | 91 | /**  | 
                                                        
@@ -252,7 +252,7 @@ discard block  | 
                                                    ||
| 252 | 252 | // pattern such as "library/*", making any string check convenient.  | 
                                                        
| 253 | 253 |          $cleanQuoted = str_replace('\*', '.*', $quoted); | 
                                                        
| 254 | 254 | |
| 255 | -        return (bool)preg_match('#^' . $cleanQuoted . '\z#', $value); | 
                                                        |
| 255 | +        return (bool) preg_match('#^' . $cleanQuoted . '\z#', $value); | 
                                                        |
| 256 | 256 | }  | 
                                                        
| 257 | 257 | |
| 258 | 258 | /**  | 
                                                        
@@ -564,7 +564,7 @@ discard block  | 
                                                    ||
| 564 | 564 | */  | 
                                                        
| 565 | 565 | public static function isAscii(string $value): bool  | 
                                                        
| 566 | 566 |      { | 
                                                        
| 567 | -        return (bool)!preg_match('/[^\x00-\x7F]/S', $value); | 
                                                        |
| 567 | +        return (bool) !preg_match('/[^\x00-\x7F]/S', $value); | 
                                                        |
| 568 | 568 | }  | 
                                                        
| 569 | 569 | |
| 570 | 570 | /**  | 
                                                        
@@ -597,7 +597,7 @@ discard block  | 
                                                    ||
| 597 | 597 |      { | 
                                                        
| 598 | 598 | $bytes = random_bytes((int) ceil($length / 2));  | 
                                                        
| 599 | 599 | |
| 600 | - return (string)substr(bin2hex($bytes), 0, $length);  | 
                                                        |
| 600 | + return (string) substr(bin2hex($bytes), 0, $length);  | 
                                                        |
| 601 | 601 | }  | 
                                                        
| 602 | 602 | |
| 603 | 603 | /**  | 
                                                        
@@ -662,7 +662,7 @@ discard block  | 
                                                    ||
| 662 | 662 | $pool = '2345679ACDEFHJKLMNPRSTUVWXYZ';  | 
                                                        
| 663 | 663 | break;  | 
                                                        
| 664 | 664 | default:  | 
                                                        
| 665 | - $pool = (string)$type;  | 
                                                        |
| 665 | + $pool = (string) $type;  | 
                                                        |
| 666 | 666 | $utf8 = !self::isAscii($pool);  | 
                                                        
| 667 | 667 | break;  | 
                                                        
| 668 | 668 | }  | 
                                                        
@@ -50,8 +50,7 @@  | 
                                                    ||
| 50 | 50 | * Class Str  | 
                                                        
| 51 | 51 | * @package Platine\Stdlib\Helper  | 
                                                        
| 52 | 52 | */  | 
                                                        
| 53 | -class Str  | 
                                                        |
| 54 | -{ | 
                                                        |
| 53 | +class Str { | 
                                                        |
| 55 | 54 | |
| 56 | 55 | /**  | 
                                                        
| 57 | 56 | * The cache of snake-cased words.  |