Passed
Push — master ( 1829cf...0babfa )
by Murat
03:42
created
src/EasyFunction.php 3 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -18,15 +18,15 @@
 block discarded – undo
18 18
         }
19 19
 
20 20
         $continue = true;
21
-		while ($continue) {
21
+        while ($continue) {
22 22
 
23
-			$check = $model->where($field, $rnd)->first();
23
+            $check = $model->where($field, $rnd)->first();
24 24
 
25
-			if (!$check)
26
-				$continue = false;
25
+            if (!$check)
26
+                $continue = false;
27 27
 
28
-			return $rnd;
29
-		}
28
+            return $rnd;
29
+        }
30 30
     }
31 31
 
32 32
     private static function randomStr($length = 16)
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -11,9 +11,9 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,8 +22,9 @@
 block discarded – undo
22 22
 
23 23
 			$check = $model->where($field, $rnd)->first();
24 24
 
25
-			if (!$check)
26
-				$continue = false;
25
+			if (!$check) {
26
+							$continue = false;
27
+			}
27 28
 
28 29
 			return $rnd;
29 30
 		}
Please login to merge, or discard this patch.
src/EasyFunctionsServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
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');
Please login to merge, or discard this patch.