Passed
Push — master ( 25dddf...11bb37 )
by Daniel
04:11 queued 01:41
created
php_cs.dist.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -13,8 +13,8 @@  discard block
 block discarded – undo
13 13
 return (new PhpCsFixer\Config())
14 14
     ->setRules([
15 15
         '@PSR12' => true,
16
-        'array_syntax' => ['syntax' => 'short'],
17
-        'ordered_imports' => ['sort_algorithm' => 'alpha'],
16
+        'array_syntax' => [ 'syntax' => 'short' ],
17
+        'ordered_imports' => [ 'sort_algorithm' => 'alpha' ],
18 18
         'no_unused_imports' => true,
19 19
         'not_operator_with_successor_space' => true,
20 20
         'trailing_comma_in_multiline' => true,
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
         'unary_operator_spaces' => true,
23 23
         'binary_operator_spaces' => true,
24 24
         'blank_line_before_statement' => [
25
-            'statements' => ['break', 'continue', 'declare', 'return', 'throw', 'try'],
25
+            'statements' => [ 'break', 'continue', 'declare', 'return', 'throw', 'try' ],
26 26
         ],
27 27
         'phpdoc_single_line_var_spacing' => true,
28 28
         'phpdoc_var_without_name' => true,
Please login to merge, or discard this patch.
src/OTPGenerator.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -87,11 +87,11 @@  discard block
 block discarded – undo
87 87
 
88 88
 
89 89
         // Does the property exist on this object?
90
-        if (! property_exists($this, $property)) {
90
+        if (!property_exists($this, $property)) {
91 91
             return;
92 92
         }
93 93
 
94
-        $this->{$property} = $params[0] ?? null;
94
+        $this->{$property} = $params[ 0 ] ?? null;
95 95
 
96 96
         return $this;
97 97
     }
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
     {
141 141
         $otp = OtpModel::where('identifier', $identifier)->first();
142 142
 
143
-        if (! $otp) {
143
+        if (!$otp) {
144 144
             return (object) [
145 145
                 'status' => false,
146 146
                 'message' => 'OTP does not exists, Please generate new OTP',
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
     {
181 181
         $otp = OtpModel::where('identifier', $identifier)->first();
182 182
 
183
-        if (! $otp) {
183
+        if (!$otp) {
184 184
             return (object) [
185 185
                 'status' => false,
186 186
                 'message' => 'OTP does not exists, Please generate new OTP',
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
         $length = strlen($characters);
211 211
         $pin = '';
212 212
         for ($i = 0; $i < $this->length; $i++) {
213
-            $pin .= $characters[rand(0, $length - 1)];
213
+            $pin .= $characters[ rand(0, $length - 1) ];
214 214
         }
215 215
 
216 216
         return $pin;
Please login to merge, or discard this patch.
src/OTPGeneratorServiceProvider.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -12,8 +12,8 @@  discard block
 block discarded – undo
12 12
      * @return void
13 13
      */
14 14
 
15
-     public const DB = __DIR__.'/../database/migrations';
16
-     public const CONFIG = __DIR__.'/../config/otp-generator.php';
15
+        public const DB = __DIR__.'/../database/migrations';
16
+        public const CONFIG = __DIR__.'/../config/otp-generator.php';
17 17
      
18 18
     public function boot()
19 19
     {
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
             $migrationFileName = 'create_otps_table.php';
26 26
             if (! $this->migrationFileExists($migrationFileName)) {
27 27
                 $this->publishes([
28
-                   self::DB."/{$migrationFileName}.stub" => database_path('migrations/' . date('Y_m_d_His', time()) . '_' . $migrationFileName),
28
+                    self::DB."/{$migrationFileName}.stub" => database_path('migrations/' . date('Y_m_d_His', time()) . '_' . $migrationFileName),
29 29
                 ], 'migrations');
30 30
             }
31 31
         }
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -12,8 +12,8 @@  discard block
 block discarded – undo
12 12
      * @return void
13 13
      */
14 14
 
15
-     public const DB = __DIR__.'/../database/migrations';
16
-     public const CONFIG = __DIR__.'/../config/otp-generator.php';
15
+     public const DB = __DIR__ . '/../database/migrations';
16
+     public const CONFIG = __DIR__ . '/../config/otp-generator.php';
17 17
      
18 18
     public function boot()
19 19
     {
@@ -23,9 +23,9 @@  discard block
 block discarded – undo
23 23
             ], 'config');
24 24
 
25 25
             $migrationFileName = 'create_otps_table.php';
26
-            if (! $this->migrationFileExists($migrationFileName)) {
26
+            if (!$this->migrationFileExists($migrationFileName)) {
27 27
                 $this->publishes([
28
-                   self::DB."/{$migrationFileName}.stub" => database_path('migrations/' . date('Y_m_d_His', time()) . '_' . $migrationFileName),
28
+                   self::DB . "/{$migrationFileName}.stub" => database_path('migrations/' . date('Y_m_d_His', time()) . '_' . $migrationFileName),
29 29
                 ], 'migrations');
30 30
             }
31 31
         }
Please login to merge, or discard this patch.