Passed
Push — main ( 97a5a2...d45d99 )
by ikechukwu
07:34 queued 04:38
created
Tests/TestCase.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
 
16 16
     public function setUp(): void
17 17
     {
18
-      parent::setUp();
18
+        parent::setUp();
19 19
     }
20 20
 
21 21
     protected function defineDatabaseMigrations()
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,11 +27,11 @@
 block discarded – undo
27 27
     protected function defineRoutes($router)
28 28
     {
29 29
         // Define routes.
30
-        $router->get('login', function () {
30
+        $router->get('login', function() {
31 31
             return 'login';
32 32
         })->name('login');
33 33
 
34
-        $router->get('change/pin', function () {
34
+        $router->get('change/pin', function() {
35 35
             return 'changePinView';
36 36
         })->name('changePinView');
37 37
 
Please login to merge, or discard this patch.
Tests/NotificationsTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
 
22 22
         $user = TestUser::create([
23 23
             'name' => str::random(),
24
-            'email' => Str::random(40) . '@example.com',
24
+            'email' => Str::random(40).'@example.com',
25 25
             'password' => Hash::make('password'),
26 26
             'pin' => Hash::make('0000'),
27 27
         ]);
Please login to merge, or discard this patch.
Tests/PinTest.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
 {
16 16
     use WithFaker;
17 17
 
18
-   /**
18
+    /**
19 19
      * A basic feature test example.
20 20
      *
21 21
      * @return void
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 
28 28
         $user = TestUser::create([
29 29
             'name' => str::random(),
30
-            'email' => Str::random(40) . '@example.com',
30
+            'email' => Str::random(40).'@example.com',
31 31
             'password' => Hash::make('password'),
32 32
             'pin' => Hash::make(config('requirepin.default', '0000'))
33 33
         ]); // Would still have the default pin
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
     {
49 49
         $user = TestUser::create([
50 50
             'name' => str::random(),
51
-            'email' => Str::random(40) . '@example.com',
51
+            'email' => Str::random(40).'@example.com',
52 52
             'password' => Hash::make('password'),
53 53
             'pin' => Hash::make(config('requirepin.default', '0000')),
54 54
         ]);
@@ -67,14 +67,14 @@  discard block
 block discarded – undo
67 67
         $responseArray = json_decode($response->getContent(), true);
68 68
 
69 69
         $this->assertEquals(200, $responseArray['status_code']);
70
-        $this->assertEquals( 'success', $responseArray['status']);
70
+        $this->assertEquals('success', $responseArray['status']);
71 71
     }
72 72
 
73 73
     public function testRequirePinMiddleWareForCreateBook()
74 74
     {
75 75
         $user = TestUser::create([
76 76
             'name' => str::random(),
77
-            'email' => Str::random(40) . '@example.com',
77
+            'email' => Str::random(40).'@example.com',
78 78
             'password' => Hash::make('password'),
79 79
             'pin' => Hash::make('1234'),
80 80
             'default_pin' => 0
@@ -85,11 +85,11 @@  discard block
 block discarded – undo
85 85
         $this->assertTrue(Hash::check('1234', $user->pin));
86 86
 
87 87
         $postData = [
88
-            'name' => $this->faker->sentence(rand(1,5)),
88
+            'name' => $this->faker->sentence(rand(1, 5)),
89 89
             'isbn' => $this->faker->unique()->isbn13(),
90 90
             'authors' => implode(",", [$this->faker->name(), $this->faker->name()]),
91 91
             'publisher' => $this->faker->name(),
92
-            'number_of_pages' => rand(45,1500),
92
+            'number_of_pages' => rand(45, 1500),
93 93
             'country' => $this->faker->countryISOAlpha3(),
94 94
             'release_date' => date('Y-m-d')
95 95
         ];
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
     {
119 119
         $user = TestUser::create([
120 120
             'name' => str::random(),
121
-            'email' => Str::random(40) . '@example.com',
121
+            'email' => Str::random(40).'@example.com',
122 122
             'password' => Hash::make('password'),
123 123
             'pin' => Hash::make('1234'),
124 124
             'default_pin' => 0
@@ -133,11 +133,11 @@  discard block
 block discarded – undo
133 133
 
134 134
             if (!isset($book->id)) {
135 135
                 $book = Book::create([
136
-                    'name' => $this->faker->sentence(rand(1,5)),
136
+                    'name' => $this->faker->sentence(rand(1, 5)),
137 137
                     'isbn' => $this->faker->unique()->isbn13(),
138 138
                     'authors' => implode(",", [$this->faker->name(), $this->faker->name()]),
139 139
                     'publisher' => $this->faker->name(),
140
-                    'number_of_pages' => rand(45,1500),
140
+                    'number_of_pages' => rand(45, 1500),
141 141
                     'country' => $this->faker->countryISOAlpha3(),
142 142
                     'release_date' => date('Y-m-d')
143 143
                 ]);
Please login to merge, or discard this patch.
src/Services/ThrottleRequestsService.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -17,32 +17,32 @@
 block discarded – undo
17 17
         $this->delayMinutes = $maxAttempts;
18 18
     }
19 19
 
20
-    public function hasTooManyAttempts (Request $request)
20
+    public function hasTooManyAttempts(Request $request)
21 21
     {
22 22
         return $this->hasTooManyLoginAttempts($request);
23 23
     }
24 24
 
25
-    public function incrementAttempts (Request $request)
25
+    public function incrementAttempts(Request $request)
26 26
     {
27 27
         return $this->incrementLoginAttempts($request);
28 28
     }
29 29
 
30
-    public function clearAttempts (Request $request)
30
+    public function clearAttempts(Request $request)
31 31
     {
32 32
         return $this->clearLoginAttempts($request);
33 33
     }
34 34
 
35
-    public function _fireLockoutEvent (Request $request)
35
+    public function _fireLockoutEvent(Request $request)
36 36
     {
37 37
         return $this->fireLockoutEvent($request);
38 38
     }
39 39
 
40
-    public function _limiter ()
40
+    public function _limiter()
41 41
     {
42 42
         return $this->limiter();
43 43
     }
44 44
 
45
-    public function _throttleKey (Request $request)
45
+    public function _throttleKey(Request $request)
46 46
     {
47 47
         return $this->throttleKey($request);
48 48
     }
Please login to merge, or discard this patch.
src/RequirePinServiceProvider.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -35,11 +35,11 @@
 block discarded – undo
35 35
         $router = $this->app->make(Router::class);
36 36
         $router->aliasMiddleware('require.pin', RequirePin::class);
37 37
 
38
-        Route::middleware('api')->prefix('api')->group(function () {
38
+        Route::middleware('api')->prefix('api')->group(function() {
39 39
             $this->loadRoutesFrom(self::ROUTE_API);
40 40
         });
41 41
 
42
-        Route::middleware('web')->group(function () {
42
+        Route::middleware('web')->group(function() {
43 43
             $this->loadRoutesFrom(self::ROUTE_WEB);
44 44
         });
45 45
 
Please login to merge, or discard this patch.
src/migrations/2022_10_11_234205_add_column_pin_to_users_table.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
      */
15 15
     public function up()
16 16
     {
17
-        Schema::table('users', function (Blueprint $table) {
17
+        Schema::table('users', function(Blueprint $table) {
18 18
             $table->string('pin')->after('password')->default(Hash::make(config('requirepin.default', '0000')));
19 19
             $table->tinyInteger('default_pin')->after('pin')->default(1);
20 20
         });
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
      */
28 28
     public function down()
29 29
     {
30
-        Schema::table('users', function (Blueprint $table) {
30
+        Schema::table('users', function(Blueprint $table) {
31 31
             $table->dropColumn(['pin', 'default_pin']);
32 32
         });
33 33
     }
Please login to merge, or discard this patch.
src/migrations/2022_10_12_224623_create_old_pins_table.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 up()
15 15
     {
16
-        Schema::create('old_pins', function (Blueprint $table) {
16
+        Schema::create('old_pins', function(Blueprint $table) {
17 17
             $table->id();
18 18
             $table->foreignId('user_id')->constrained('users');
19 19
             $table->string('pin');
Please login to merge, or discard this patch.
src/migrations/2022_09_12_005402_create_books_table.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 up()
15 15
     {
16
-        Schema::create('books', function (Blueprint $table) {
16
+        Schema::create('books', function(Blueprint $table) {
17 17
             $table->id();
18 18
             $table->string('name');
19 19
             $table->string('isbn')->unique();
Please login to merge, or discard this patch.
src/migrations/2022_10_12_193200_create_require_pins_table.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 up()
15 15
     {
16
-        Schema::create('require_pins', function (Blueprint $table) {
16
+        Schema::create('require_pins', function(Blueprint $table) {
17 17
             $table->id();
18 18
             $table->foreignId('user_id')->constrained('users');
19 19
             $table->string('uuid')->unique();
Please login to merge, or discard this patch.