@@ -11,9 +11,9 @@ discard block |
||
| 11 | 11 | */ |
| 12 | 12 | public static function checkFieldForRandom($model, string $field, string $type = 'str', int $length = 8) |
| 13 | 13 | { |
| 14 | - if($type == 'str') { |
|
| 14 | + if ($type == 'str') { |
|
| 15 | 15 | $rnd = self::randomStr($length); |
| 16 | - } else if($type == 'int') { |
|
| 16 | + } else if ($type == 'int') { |
|
| 17 | 17 | $rnd = self::randomInt($length); |
| 18 | 18 | } |
| 19 | 19 | |
@@ -46,10 +46,10 @@ discard block |
||
| 46 | 46 | |
| 47 | 47 | private static function randomInt($length = 4) |
| 48 | 48 | { |
| 49 | - $rand = ''; |
|
| 50 | - while( !( isset( $rand[$length-1] ) ) ) { |
|
| 51 | - $rand .= mt_rand( ); |
|
| 49 | + $rand = ''; |
|
| 50 | + while (!(isset($rand[$length - 1]))) { |
|
| 51 | + $rand .= mt_rand( ); |
|
| 52 | 52 | } |
| 53 | - return (int)substr( $rand , 0 , $length ); |
|
| 53 | + return (int)substr($rand, 0, $length); |
|
| 54 | 54 | } |
| 55 | 55 | } |
| 56 | 56 | \ No newline at end of file |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | */ |
| 14 | 14 | public function register() |
| 15 | 15 | { |
| 16 | - $this->app->bind(EasyFunction::class, function () { |
|
| 16 | + $this->app->bind(EasyFunction::class, function() { |
|
| 17 | 17 | return new EasyFunction(); |
| 18 | 18 | }); |
| 19 | 19 | $this->app->alias(EasyFunction::class, 'easy-functions'); |