@@ -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'); |
@@ -19,7 +19,7 @@ discard block |
||
| 19 | 19 | while ($continue) { |
| 20 | 20 | $check = $model->where($field, $rnd)->first(); |
| 21 | 21 | |
| 22 | - if (! $check) { |
|
| 22 | + if (!$check) { |
|
| 23 | 23 | $continue = false; |
| 24 | 24 | } |
| 25 | 25 | |
@@ -45,19 +45,19 @@ discard block |
||
| 45 | 45 | private static function randomInt($length = 4) |
| 46 | 46 | { |
| 47 | 47 | $rand = ''; |
| 48 | - while (! (isset($rand[$length - 1]))) { |
|
| 48 | + while (!(isset($rand[$length - 1]))) { |
|
| 49 | 49 | $rand .= mt_rand(); |
| 50 | 50 | } |
| 51 | 51 | |
| 52 | - return (int) substr($rand, 0, $length); |
|
| 52 | + return (int)substr($rand, 0, $length); |
|
| 53 | 53 | } |
| 54 | 54 | |
| 55 | 55 | public static function decimalToTime($decimal) |
| 56 | 56 | { |
| 57 | - if (! $decimal) { |
|
| 57 | + if (!$decimal) { |
|
| 58 | 58 | return 'Empty data given.'; |
| 59 | 59 | } |
| 60 | - if (strpos((string) $decimal, '.') !== false) { |
|
| 60 | + if (strpos((string)$decimal, '.') !== false) { |
|
| 61 | 61 | $timeArray = explode('.', $decimal); |
| 62 | 62 | |
| 63 | 63 | $zero = new DateTime('@0'); |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | $timeString = sprintf('%02d:%02d:%02d:%02d', $diff->days, $diff->h, $diff->i, $diff->s); |
| 68 | 68 | |
| 69 | 69 | if (isset($timeArray[1])) { |
| 70 | - if (strlen((string) $timeArray[1]) == 1) { |
|
| 70 | + if (strlen((string)$timeArray[1]) == 1) { |
|
| 71 | 71 | $timeArray[1] = sprintf('%1s0', $timeArray[1]); |
| 72 | 72 | |
| 73 | 73 | return $timeString.'.'.$timeArray[1]; |