@@ -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"); |
@@ -66,8 +66,8 @@ discard block |
||
| 66 | 66 | |
| 67 | 67 | $timeString = sprintf("%02d:%02d:%02d:%02d", $diff->days, $diff->h, $diff->i, $diff->s); |
| 68 | 68 | |
| 69 | - if(isset($timeArray[1])) { |
|
| 70 | - if(strlen((string) $timeArray[1]) == 1) { |
|
| 69 | + if (isset($timeArray[1])) { |
|
| 70 | + if (strlen((string)$timeArray[1]) == 1) { |
|
| 71 | 71 | $timeArray[1] = sprintf("%1s0", $timeArray[1]); |
| 72 | 72 | return $timeString.'.'.$timeArray[1]; |
| 73 | 73 | } |