Passed
Branch master (c8dac2)
by Jimmy
07:53
created
routes/web.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,4 +4,4 @@
 block discarded – undo
4 4
 use Illuminate\Support\Facades\Route;
5 5
 
6 6
 Route::get(Config::get('formio.route.uri', 'api/formio/jwt'), 'FormioController@jwt')
7
-     ->name(Config::get('formio.route.name', 'formio.jwt'));
7
+        ->name(Config::get('formio.route.name', 'formio.jwt'));
Please login to merge, or discard this patch.
migrations/2019_09_23_194855_add_formio_password_to_users_table.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,8 +17,8 @@
 block discarded – undo
17 17
             'users',
18 18
             function (Blueprint $table) {
19 19
                 $table->string('formio_password')
20
-                      ->after('password')
21
-                      ->nullable();
20
+                        ->after('password')
21
+                        ->nullable();
22 22
             }
23 23
         );
24 24
     }
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
     {
16 16
         Schema::table(
17 17
             'users',
18
-            function (Blueprint $table) {
18
+            function(Blueprint $table) {
19 19
                 $table->string('formio_password')
20 20
                       ->after('password')
21 21
                       ->nullable();
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
     {
33 33
         Schema::table(
34 34
             'users',
35
-            function (Blueprint $table) {
35
+            function(Blueprint $table) {
36 36
                 $table->dropColumn('formio_password');
37 37
             }
38 38
         );
Please login to merge, or discard this patch.
src/Client.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -164,11 +164,11 @@
 block discarded – undo
164 164
     {
165 165
         // TODO: Add some error checking to user parsing
166 166
         $this->token = $this->token->setUser(json_decode($response->getBody(), true))
167
-                                   ->setJwt(
168
-                                       $response->getHeader('x-jwt-token')[0],
169
-                                       $this->configs['jwt']['secret'],
170
-                                       $this->configs['jwt']['algorithm']
171
-                                   );
167
+                                    ->setJwt(
168
+                                        $response->getHeader('x-jwt-token')[0],
169
+                                        $this->configs['jwt']['secret'],
170
+                                        $this->configs['jwt']['algorithm']
171
+                                    );
172 172
     }
173 173
 
174 174
     /**
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
         }
190 190
 
191 191
         if ($this->token->expired()) {
192
-            throw new TokenException('Token expired ' . $this->token->expires_at->diffForHumans());
192
+            throw new TokenException('Token expired '.$this->token->expires_at->diffForHumans());
193 193
         }
194 194
 
195 195
         try {
@@ -270,6 +270,6 @@  discard block
 block discarded – undo
270 270
      */
271 271
     public function uri($path = null)
272 272
     {
273
-        return rtrim($this->configs['url'], '/') . '/' . ltrim($path, '/');
273
+        return rtrim($this->configs['url'], '/').'/'.ltrim($path, '/');
274 274
     }
275 275
 }
Please login to merge, or discard this patch.
src/Providers/ServiceProvider.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 
73 73
                 $resourceIds = function () use ($formio) {
74 74
                     $id = $formio->login()
75
-                                 ->request('form?name=user')[0]['_id'];
75
+                                    ->request('form?name=user')[0]['_id'];
76 76
 
77 77
                     $formio->logout();
78 78
 
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
                         Cache::remember(
87 87
                             'formio.id',
88 88
                             Carbon::now()
89
-                                  ->addDay(),
89
+                                    ->addDay(),
90 90
                             $resourceIds
91 91
                         )
92 92
                     );
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
 
97 97
                 $roleIds = function () use ($formio) {
98 98
                     $roles = (array)$formio->login()
99
-                                           ->request('role?title=Authenticated')[0]['_id'];
99
+                                            ->request('role?title=Authenticated')[0]['_id'];
100 100
 
101 101
                     $formio->logout();
102 102
 
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
                         Cache::remember(
111 111
                             'formio.user.roles',
112 112
                             Carbon::now()
113
-                                  ->addDay(),
113
+                                    ->addDay(),
114 114
                             $roleIds
115 115
                         )
116 116
                     );
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
      */
40 40
     public function register()
41 41
     {
42
-        $this->mergeConfigFrom(__DIR__ . '/../../config/formio.php', 'formio');
42
+        $this->mergeConfigFrom(__DIR__.'/../../config/formio.php', 'formio');
43 43
 
44 44
         $this->registerClient();
45 45
 
@@ -67,10 +67,10 @@  discard block
 block discarded – undo
67 67
     {
68 68
         $this->app->bind(
69 69
             Formio::class,
70
-            function (Application $app) {
70
+            function(Application $app) {
71 71
                 $formio = new Formio(Config::get('formio'), $app->make(Guzzle::class));
72 72
 
73
-                $resourceIds = function () use ($formio) {
73
+                $resourceIds = function() use ($formio) {
74 74
                     $id = $formio->login()
75 75
                                  ->request('form?name=user')[0]['_id'];
76 76
 
@@ -94,8 +94,8 @@  discard block
 block discarded – undo
94 94
                     $formio->setConfigs(Config::get('formio'));
95 95
                 }
96 96
 
97
-                $roleIds = function () use ($formio) {
98
-                    $roles = (array)$formio->login()
97
+                $roleIds = function() use ($formio) {
98
+                    $roles = (array) $formio->login()
99 99
                                            ->request('role?title=Authenticated')[0]['_id'];
100 100
 
101 101
                     $formio->logout();
@@ -131,18 +131,18 @@  discard block
 block discarded – undo
131 131
     protected function registerPublishes()
132 132
     {
133 133
         if ($this->app->runningInConsole()) {
134
-            $this->loadMigrationsFrom(__DIR__ . '/../../database/migrations');
134
+            $this->loadMigrationsFrom(__DIR__.'/../../database/migrations');
135 135
 
136 136
             $this->publishes(
137 137
                 [
138
-                    __DIR__ . '/../../config/formio.php' => config_path('formio.php'),
138
+                    __DIR__.'/../../config/formio.php' => config_path('formio.php'),
139 139
                 ],
140 140
                 'formio-config'
141 141
             );
142 142
 
143 143
             $this->publishes(
144 144
                 [
145
-                    __DIR__ . '/../../database/migrations' => database_path('migrations'),
145
+                    __DIR__.'/../../database/migrations' => database_path('migrations'),
146 146
                 ],
147 147
                 'formio-migrations'
148 148
             );
@@ -160,8 +160,8 @@  discard block
 block discarded – undo
160 160
                     'namespace'  => 'Spinen\Formio\Http\Controllers',
161 161
                     'middleware' => Config::get('formio.route.middleware', ['api', 'auth:api']),
162 162
                 ],
163
-                function () {
164
-                    $this->loadRoutesFrom(realpath(__DIR__ . '/../../routes/web.php'));
163
+                function() {
164
+                    $this->loadRoutesFrom(realpath(__DIR__.'/../../routes/web.php'));
165 165
                 }
166 166
             );
167 167
         }
Please login to merge, or discard this patch.