@@ -63,14 +63,14 @@ |
||
63 | 63 | { |
64 | 64 | $this->app->bind( |
65 | 65 | Builder::class, |
66 | - function (Application $app) { |
|
66 | + function(Application $app) { |
|
67 | 67 | return new Builder($app->make(ClickUp::class)); |
68 | 68 | } |
69 | 69 | ); |
70 | 70 | |
71 | 71 | $this->app->bind( |
72 | 72 | ClickUp::class, |
73 | - function (Application $app) { |
|
73 | + function(Application $app) { |
|
74 | 74 | return new ClickUp(Config::get('clickup'), $app->make(Guzzle::class)); |
75 | 75 | } |
76 | 76 | ); |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | { |
125 | 125 | return tap( |
126 | 126 | $this->make($attributes), |
127 | - function (Model $model) { |
|
127 | + function(Model $model) { |
|
128 | 128 | $model->save(); |
129 | 129 | } |
130 | 130 | ); |
@@ -154,12 +154,12 @@ discard block |
||
154 | 154 | |
155 | 155 | // Convert to a collection of filtered objects casted to the class |
156 | 156 | return (new Collection((array_values($response) === $response) ? $response : [$response]))->map( |
157 | - function ($items) use ($properties) { |
|
157 | + function($items) use ($properties) { |
|
158 | 158 | // Cast to class with only the requested, properties |
159 | 159 | return $this->getModel() |
160 | 160 | ->newFromBuilder( |
161 | 161 | $properties === ['*'] |
162 | - ? (array)$items |
|
162 | + ? (array) $items |
|
163 | 163 | : collect($items) |
164 | 164 | ->only($properties) |
165 | 165 | ->toArray() |
@@ -221,7 +221,7 @@ discard block |
||
221 | 221 | */ |
222 | 222 | protected function assumeForeignKey($related): string |
223 | 223 | { |
224 | - return Str::snake((new $related())->getResponseKey()) . '_id'; |
|
224 | + return Str::snake((new $related())->getResponseKey()).'_id'; |
|
225 | 225 | } |
226 | 226 | |
227 | 227 | /** |
@@ -366,17 +366,17 @@ discard block |
||
366 | 366 | |
367 | 367 | // If have an id, then put it on the end |
368 | 368 | if ($this->getKey()) { |
369 | - $path .= '/' . $this->getKey(); |
|
369 | + $path .= '/'.$this->getKey(); |
|
370 | 370 | } |
371 | 371 | |
372 | 372 | // Stick any extra things on the end |
373 | 373 | if (!is_null($extra)) { |
374 | - $path .= '/' . ltrim($extra, '/'); |
|
374 | + $path .= '/'.ltrim($extra, '/'); |
|
375 | 375 | } |
376 | 376 | |
377 | 377 | // Convert query to querystring format and put on the end |
378 | 378 | if (!empty($query)) { |
379 | - $path .= '?' . http_build_query($query); |
|
379 | + $path .= '?'.http_build_query($query); |
|
380 | 380 | } |
381 | 381 | |
382 | 382 | // If there is a parentModel & not have an id (unless for nested), then prepend parentModel |
@@ -422,7 +422,7 @@ discard block |
||
422 | 422 | |
423 | 423 | return tap( |
424 | 424 | $relation->getResults(), |
425 | - function ($results) use ($method) { |
|
425 | + function($results) use ($method) { |
|
426 | 426 | $this->setRelation($method, $results); |
427 | 427 | } |
428 | 428 | ); |
@@ -468,7 +468,7 @@ discard block |
||
468 | 468 | $model = (new $related([], $this->parentModel))->setClient($this->getClient()); |
469 | 469 | |
470 | 470 | return (new Collection($given))->map( |
471 | - function ($attributes) use ($model, $reset) { |
|
471 | + function($attributes) use ($model, $reset) { |
|
472 | 472 | return $model->newFromBuilder($reset ? reset($attributes) : $attributes); |
473 | 473 | } |
474 | 474 | ); |
@@ -540,7 +540,7 @@ discard block |
||
540 | 540 | { |
541 | 541 | $model = $this->newInstance([], true); |
542 | 542 | |
543 | - $model->setRawAttributes((array)$attributes, true); |
|
543 | + $model->setRawAttributes((array) $attributes, true); |
|
544 | 544 | |
545 | 545 | return $model; |
546 | 546 | } |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | */ |
36 | 36 | public function register() |
37 | 37 | { |
38 | - $this->mergeConfigFrom(__DIR__ . '/../../config/clickup.php', 'clickup'); |
|
38 | + $this->mergeConfigFrom(__DIR__.'/../../config/clickup.php', 'clickup'); |
|
39 | 39 | } |
40 | 40 | |
41 | 41 | /** |
@@ -57,18 +57,18 @@ discard block |
||
57 | 57 | protected function registerPublishes() |
58 | 58 | { |
59 | 59 | if ($this->app->runningInConsole()) { |
60 | - $this->loadMigrationsFrom(__DIR__ . '/../../database/migrations'); |
|
60 | + $this->loadMigrationsFrom(__DIR__.'/../../database/migrations'); |
|
61 | 61 | |
62 | 62 | $this->publishes( |
63 | 63 | [ |
64 | - __DIR__ . '/../../config/clickup.php' => config_path('clickup.php'), |
|
64 | + __DIR__.'/../../config/clickup.php' => config_path('clickup.php'), |
|
65 | 65 | ], |
66 | 66 | 'clickup-config' |
67 | 67 | ); |
68 | 68 | |
69 | 69 | $this->publishes( |
70 | 70 | [ |
71 | - __DIR__ . '/../../database/migrations' => database_path('migrations'), |
|
71 | + __DIR__.'/../../database/migrations' => database_path('migrations'), |
|
72 | 72 | ], |
73 | 73 | 'clickup-migrations' |
74 | 74 | ); |
@@ -86,8 +86,8 @@ discard block |
||
86 | 86 | 'namespace' => 'Spinen\ClickUp\Http\Controllers', |
87 | 87 | 'middleware' => Config::get('clickup.route.middleware', ['web']), |
88 | 88 | ], |
89 | - function () { |
|
90 | - $this->loadRoutesFrom(realpath(__DIR__ . '/../../routes/web.php')); |
|
89 | + function() { |
|
90 | + $this->loadRoutesFrom(realpath(__DIR__.'/../../routes/web.php')); |
|
91 | 91 | } |
92 | 92 | ); |
93 | 93 | } |
@@ -3,5 +3,5 @@ |
||
3 | 3 | use Illuminate\Support\Facades\Config; |
4 | 4 | use Illuminate\Support\Facades\Route; |
5 | 5 | |
6 | -Route::get(rtrim(Config::get('clickup.route.sso', '/clickup/sso'), '/') . '/{user}', 'ClickUpController@processCode') |
|
6 | +Route::get(rtrim(Config::get('clickup.route.sso', '/clickup/sso'), '/').'/{user}', 'ClickUpController@processCode') |
|
7 | 7 | ->name('clickup.sso.redirect_url'); |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | { |
16 | 16 | Schema::table( |
17 | 17 | 'users', |
18 | - function (Blueprint $table) { |
|
18 | + function(Blueprint $table) { |
|
19 | 19 | $table->string('clickup_token', 1024) |
20 | 20 | ->after('password') |
21 | 21 | ->nullable(); |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | { |
33 | 33 | Schema::table( |
34 | 34 | 'users', |
35 | - function (Blueprint $table) { |
|
35 | + function(Blueprint $table) { |
|
36 | 36 | $table->dropColumn('clickup_token'); |
37 | 37 | } |
38 | 38 | ); |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | */ |
88 | 88 | public function oauthRequestTokenUsingCode($code): string |
89 | 89 | { |
90 | - $path = 'oauth/token?' . http_build_query( |
|
90 | + $path = 'oauth/token?'.http_build_query( |
|
91 | 91 | [ |
92 | 92 | 'client_id' => $this->configs['oauth']['id'], |
93 | 93 | 'client_secret' => $this->configs['oauth']['secret'], |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | public function oauthUri($url): string |
129 | 129 | { |
130 | 130 | return $this->uri( |
131 | - '?' . http_build_query( |
|
131 | + '?'.http_build_query( |
|
132 | 132 | [ |
133 | 133 | 'client_id' => $this->configs['oauth']['id'], |
134 | 134 | 'redirect_uri' => $url, |
@@ -251,6 +251,6 @@ discard block |
||
251 | 251 | */ |
252 | 252 | public function uri($path = null, $url = null): string |
253 | 253 | { |
254 | - return rtrim(($url ?: $this->configs['url']), '/') . (Str::startsWith($path, '?') ? null : '/') . ltrim($path, '/'); |
|
254 | + return rtrim(($url ?: $this->configs['url']), '/').(Str::startsWith($path, '?') ? null : '/').ltrim($path, '/'); |
|
255 | 255 | } |
256 | 256 | } |