@@ -111,7 +111,7 @@ |
||
111 | 111 | ->exchangeAuthorizationCodeForToken($code, $realm_id); |
112 | 112 | |
113 | 113 | $this->getDataService() |
114 | - ->updateOAuth2Token($oauth_token); |
|
114 | + ->updateOAuth2Token($oauth_token); |
|
115 | 115 | |
116 | 116 | $this->token->parseOauthToken($oauth_token) |
117 | 117 | ->save(); |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | if ($quickbooks->hasValidRefreshToken()) { |
38 | 38 | return $view_factory->make('quickbooks::disconnect') |
39 | 39 | ->with('company', $quickbooks->getDataService() |
40 | - ->getCompanyInfo()); |
|
40 | + ->getCompanyInfo()); |
|
41 | 41 | } |
42 | 42 | |
43 | 43 | // Give view to link account |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | |
61 | 61 | // TODO: Figure out where to put this in session & remove Facade |
62 | 62 | Alert::success('Disconnected from QuickBooks') |
63 | - ->flash(); |
|
63 | + ->flash(); |
|
64 | 64 | |
65 | 65 | return $redirector->back(); |
66 | 66 | } |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | |
88 | 88 | // TODO: Figure out where to put this in session & remove Facade |
89 | 89 | Alert::success('Connected to QuickBooks') |
90 | - ->flash(); |
|
90 | + ->flash(); |
|
91 | 91 | |
92 | 92 | return $redirector->intended($url_generator->route('quickbooks.connect')); |
93 | 93 | } |
@@ -54,7 +54,7 @@ |
||
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 | /** |
@@ -42,8 +42,8 @@ |
||
42 | 42 | $this->app->singleton(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 | }); |
@@ -39,9 +39,9 @@ |
||
39 | 39 | */ |
40 | 40 | public function register() |
41 | 41 | { |
42 | - $this->app->singleton(Client::class, function (Application $app) { |
|
42 | + $this->app->singleton(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 |
@@ -25,9 +25,9 @@ |
||
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 |
@@ -13,7 +13,7 @@ |
||
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'); |
@@ -83,21 +83,21 @@ |
||
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 | /** |
@@ -86,7 +86,7 @@ |
||
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'); |