@@ -30,7 +30,7 @@ |
||
30 | 30 | */ |
31 | 31 | public function handle(Request $request, Closure $next): mixed |
32 | 32 | { |
33 | - if (! $this->quickbooks->hasValidRefreshToken()) { |
|
33 | + if (!$this->quickbooks->hasValidRefreshToken()) { |
|
34 | 34 | // Set intended route, so that after linking account, user is put where they were going |
35 | 35 | $this->session->put('url.intended', $this->url_generator->to($request->path())); |
36 | 36 |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | * @throws SdkException |
31 | 31 | * @throws ServiceException |
32 | 32 | */ |
33 | - public function connect(QuickBooks $quickbooks, ViewFactory $view_factory): ViewContract|View |
|
33 | + public function connect(QuickBooks $quickbooks, ViewFactory $view_factory): ViewContract | View |
|
34 | 34 | { |
35 | 35 | // Give view to remove token if user already linked account |
36 | 36 | if ($quickbooks->hasValidRefreshToken()) { |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | Redirector $redirector, |
55 | 55 | Request $request, |
56 | 56 | QuickBooks $quickbooks, |
57 | - ): RedirectResponse|View { |
|
57 | + ): RedirectResponse | View { |
|
58 | 58 | $quickbooks->deleteToken(); |
59 | 59 | |
60 | 60 | $request->session()->flash('success', 'Disconnected from QuickBooks'); |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | */ |
31 | 31 | public function register(): void |
32 | 32 | { |
33 | - $this->mergeConfigFrom(__DIR__.'/../../config/quickbooks.php', 'quickbooks'); |
|
33 | + $this->mergeConfigFrom(__DIR__ . '/../../config/quickbooks.php', 'quickbooks'); |
|
34 | 34 | } |
35 | 35 | |
36 | 36 | /** |
@@ -51,25 +51,25 @@ discard block |
||
51 | 51 | protected function registerPublishes(): void |
52 | 52 | { |
53 | 53 | if ($this->app->runningInConsole()) { |
54 | - $this->loadMigrationsFrom(__DIR__.'/../../database/migrations'); |
|
54 | + $this->loadMigrationsFrom(__DIR__ . '/../../database/migrations'); |
|
55 | 55 | |
56 | 56 | $this->publishes( |
57 | 57 | [ |
58 | - __DIR__.'/../../config/quickbooks.php' => config_path('quickbooks.php'), |
|
58 | + __DIR__ . '/../../config/quickbooks.php' => config_path('quickbooks.php'), |
|
59 | 59 | ], |
60 | 60 | 'quickbooks-config', |
61 | 61 | ); |
62 | 62 | |
63 | 63 | $this->publishes( |
64 | 64 | [ |
65 | - __DIR__.'/../../database/migrations' => database_path('migrations'), |
|
65 | + __DIR__ . '/../../database/migrations' => database_path('migrations'), |
|
66 | 66 | ], |
67 | 67 | 'quickbooks-migrations', |
68 | 68 | ); |
69 | 69 | |
70 | 70 | $this->publishes( |
71 | 71 | [ |
72 | - __DIR__.'/../../resources/views' => base_path( |
|
72 | + __DIR__ . '/../../resources/views' => base_path( |
|
73 | 73 | 'resources/views/vendor/quickbooks', |
74 | 74 | ), |
75 | 75 | ], |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | ->as('quickbooks.') |
91 | 91 | ->middleware($config['middleware']['default']) |
92 | 92 | ->namespace('Spinen\QuickBooks\Http\Controllers') |
93 | - ->group(function (Router $router) use ($config) { |
|
93 | + ->group(function(Router $router) use ($config) { |
|
94 | 94 | $router |
95 | 95 | ->get($config['paths']['connect'], 'Controller@connect') |
96 | 96 | ->middleware($config['middleware']['authenticated']) |
@@ -110,6 +110,6 @@ discard block |
||
110 | 110 | */ |
111 | 111 | protected function registerViews(): void |
112 | 112 | { |
113 | - $this->loadViewsFrom(__DIR__.'/../../resources/views', 'quickbooks'); |
|
113 | + $this->loadViewsFrom(__DIR__ . '/../../resources/views', 'quickbooks'); |
|
114 | 114 | } |
115 | 115 | } |
116 | 116 | \ No newline at end of file |
@@ -29,10 +29,9 @@ |
||
29 | 29 | */ |
30 | 30 | public function register(): void |
31 | 31 | { |
32 | - $this->app->bind(Client::class, function (Application $app) { |
|
32 | + $this->app->bind(Client::class, function(Application $app) { |
|
33 | 33 | $token = |
34 | - $app->auth->user()->quickBooksToken ?: |
|
35 | - $app->auth |
|
34 | + $app->auth->user()->quickBooksToken ?: $app->auth |
|
36 | 35 | ->user() |
37 | 36 | ->quickBooksToken() |
38 | 37 | ->make(); |
@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | */ |
131 | 131 | public function getDataService(): DataService |
132 | 132 | { |
133 | - if (! $this->hasValidAccessToken() || ! isset($this->data_service)) { |
|
133 | + if (!$this->hasValidAccessToken() || !isset($this->data_service)) { |
|
134 | 134 | $this->data_service = $this->makeDataService(); |
135 | 135 | |
136 | 136 | $this->configureLogging(); |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | */ |
150 | 150 | public function getReportService(): ReportService |
151 | 151 | { |
152 | - if (! $this->hasValidAccessToken() || ! isset($this->report_service)) { |
|
152 | + if (!$this->hasValidAccessToken() || !isset($this->report_service)) { |
|
153 | 153 | $this->report_service = new ReportService($this->getDataService()->getServiceContext()); |
154 | 154 | } |
155 | 155 |