Completed
Pull Request — develop (#13)
by Stephen
04:18
created
src/Token.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@
 block discarded – undo
54 54
     public function getHasValidAccessTokenAttribute()
55 55
     {
56 56
         return $this->access_token_expires_at && Carbon::now()
57
-                                                       ->lt($this->access_token_expires_at);
57
+                                                        ->lt($this->access_token_expires_at);
58 58
     }
59 59
 
60 60
     /**
Please login to merge, or discard this patch.
database/migrations/2018_03_11_141103_create_quick_books_tokens_table.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -25,9 +25,9 @@
 block discarded – undo
25 25
             $table->timestamps();
26 26
 
27 27
             $table->foreign('user_id')
28
-                  ->references('id')
29
-                  ->on('users')
30
-                  ->onDelete('cascade');
28
+                    ->references('id')
29
+                    ->on('users')
30
+                    ->onDelete('cascade');
31 31
         });
32 32
     }
33 33
 
Please login to merge, or discard this 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('quickbooks_tokens', function (Blueprint $table) {
16
+        Schema::create('quickbooks_tokens', function(Blueprint $table) {
17 17
             $table->increments('id');
18 18
             $table->unsignedInteger('user_id');
19 19
             $table->unsignedBigInteger('realm_id');
Please login to merge, or discard this patch.
src/Providers/ServiceProvider.php 2 patches
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -83,21 +83,21 @@
 block discarded – undo
83 83
         $config = $this->app->config->get('quickbooks.route');
84 84
 
85 85
         $this->app->router->prefix($config['prefix'])
86
-                          ->as('quickbooks.')
87
-                          ->middleware($config['middleware']['default'])
88
-                          ->namespace('Spinen\QuickBooks\Http\Controllers')
89
-                          ->group(function (Router $router) use ($config) {
90
-                              $router->get($config['paths']['connect'], 'Controller@connect')
91
-                                     ->middleware($config['middleware']['authenticated'])
92
-                                     ->name('connect');
93
-
94
-                              $router->delete($config['paths']['disconnect'], 'Controller@disconnect')
95
-                                     ->middleware($config['middleware']['authenticated'])
96
-                                     ->name('disconnect');
97
-
98
-                              $router->get($config['paths']['token'], 'Controller@token')
99
-                                     ->name('token');
100
-                          });
86
+                            ->as('quickbooks.')
87
+                            ->middleware($config['middleware']['default'])
88
+                            ->namespace('Spinen\QuickBooks\Http\Controllers')
89
+                            ->group(function (Router $router) use ($config) {
90
+                                $router->get($config['paths']['connect'], 'Controller@connect')
91
+                                        ->middleware($config['middleware']['authenticated'])
92
+                                        ->name('connect');
93
+
94
+                                $router->delete($config['paths']['disconnect'], 'Controller@disconnect')
95
+                                        ->middleware($config['middleware']['authenticated'])
96
+                                        ->name('disconnect');
97
+
98
+                                $router->get($config['paths']['token'], 'Controller@token')
99
+                                        ->name('token');
100
+                            });
101 101
     }
102 102
 
103 103
     /**
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@
 block discarded – undo
86 86
                           ->as('quickbooks.')
87 87
                           ->middleware($config['middleware']['default'])
88 88
                           ->namespace('Spinen\QuickBooks\Http\Controllers')
89
-                          ->group(function (Router $router) use ($config) {
89
+                          ->group(function(Router $router) use ($config) {
90 90
                               $router->get($config['paths']['connect'], 'Controller@connect')
91 91
                                      ->middleware($config['middleware']['authenticated'])
92 92
                                      ->name('connect');
Please login to merge, or discard this patch.
src/Client.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
                             ->exchangeAuthorizationCodeForToken($code, $realm_id);
124 124
 
125 125
         $this->getDataService()
126
-             ->updateOAuth2Token($oauth_token);
126
+                ->updateOAuth2Token($oauth_token);
127 127
 
128 128
         $this->token->parseOauthToken($oauth_token)
129 129
                     ->save();
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
         if (!$this->hasValidAccessToken() || !isset($this->report_service)) {
166 166
             $this->report_service = new ReportService(
167 167
                 $this->getDataService()
168
-                     ->getServiceContext()
168
+                        ->getServiceContext()
169 169
             );
170 170
         }
171 171
 
Please login to merge, or discard this patch.
src/Providers/ClientServiceProvider.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,8 +42,8 @@
 block discarded – undo
42 42
         $this->app->bind(Client::class, function (Application $app) {
43 43
             $token = ($app->auth->user()->quickBooksToken)
44 44
                 ? : $app->auth->user()
45
-                              ->quickBooksToken()
46
-                              ->make();
45
+                                ->quickBooksToken()
46
+                                ->make();
47 47
 
48 48
             return new Client($app->config->get('quickbooks'), $token);
49 49
         });
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -39,9 +39,9 @@
 block discarded – undo
39 39
      */
40 40
     public function register()
41 41
     {
42
-        $this->app->bind(Client::class, function (Application $app) {
42
+        $this->app->bind(Client::class, function(Application $app) {
43 43
             $token = ($app->auth->user()->quickBooksToken)
44
-                ? : $app->auth->user()
44
+                ?: $app->auth->user()
45 45
                               ->quickBooksToken()
46 46
                               ->make();
47 47
 
Please login to merge, or discard this patch.
src/Http/Controllers/Controller.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
         if ($quickbooks->hasValidRefreshToken()) {
37 37
             return $view_factory->make('quickbooks::disconnect')
38 38
                                 ->with('company', $quickbooks->getDataService()
39
-                                                             ->getCompanyInfo());
39
+                                                                ->getCompanyInfo());
40 40
         }
41 41
 
42 42
         // Give view to link account
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 
60 60
         // TODO: Figure out where to put this in session & remove Facade
61 61
         Alert::success('Disconnected from QuickBooks')
62
-             ->flash();
62
+                ->flash();
63 63
 
64 64
         return $redirector->back();
65 65
     }
@@ -85,6 +85,6 @@  discard block
 block discarded – undo
85 85
         $quickbooks->exchangeCodeForToken($request->get('code'), $request->get('realmId'));
86 86
 
87 87
         return $redirector->intended($url_generator->route('quickbooks.connect'))
88
-                          ->with('success', 'Connected to QuickBooks');
88
+                            ->with('success', 'Connected to QuickBooks');
89 89
     }
90 90
 }
Please login to merge, or discard this patch.