@@ -36,12 +36,12 @@ |
||
36 | 36 | { |
37 | 37 | if (is_null($this->builder)) { |
38 | 38 | $this->builder = Container::getInstance() |
39 | - ->make(Builder::class) |
|
40 | - ->setClient( |
|
41 | - Container::getInstance() |
|
42 | - ->make(ClickUp::class) |
|
43 | - ->setToken($this->clickup_token) |
|
44 | - ); |
|
39 | + ->make(Builder::class) |
|
40 | + ->setClient( |
|
41 | + Container::getInstance() |
|
42 | + ->make(ClickUp::class) |
|
43 | + ->setToken($this->clickup_token) |
|
44 | + ); |
|
45 | 45 | } |
46 | 46 | |
47 | 47 | return $this->builder; |
@@ -68,7 +68,7 @@ |
||
68 | 68 | */ |
69 | 69 | public function getClickupTokenAttribute() |
70 | 70 | { |
71 | - if (! is_null($this->attributes['clickup_token'])) { |
|
71 | + if (!is_null($this->attributes['clickup_token'])) { |
|
72 | 72 | return $this->resolveEncrypter() |
73 | 73 | ->decrypt($this->attributes['clickup_token']); |
74 | 74 | } |
@@ -47,7 +47,6 @@ |
||
47 | 47 | |
48 | 48 | /** |
49 | 49 | * @return BelongsTo |
50 | - |
|
51 | 50 | * @throws InvalidRelationshipException |
52 | 51 | * @throws ModelNotFoundException |
53 | 52 | * @throws NoClientException |
@@ -80,7 +80,6 @@ discard block |
||
80 | 80 | |
81 | 81 | /** |
82 | 82 | * @return HasMany |
83 | - |
|
84 | 83 | * @throws InvalidRelationshipException |
85 | 84 | * @throws ModelNotFoundException |
86 | 85 | * @throws NoClientException |
@@ -248,7 +247,6 @@ discard block |
||
248 | 247 | |
249 | 248 | /** |
250 | 249 | * @return HasMany |
251 | - |
|
252 | 250 | * @throws InvalidRelationshipException |
253 | 251 | * @throws ModelNotFoundException |
254 | 252 | * @throws NoClientException |
@@ -271,7 +269,6 @@ discard block |
||
271 | 269 | |
272 | 270 | /** |
273 | 271 | * @return HasMany |
274 | - |
|
275 | 272 | * @throws InvalidRelationshipException |
276 | 273 | * @throws ModelNotFoundException |
277 | 274 | * @throws NoClientException |
@@ -78,7 +78,6 @@ discard block |
||
78 | 78 | |
79 | 79 | /** |
80 | 80 | * @return HasMany |
81 | - |
|
82 | 81 | * @throws InvalidRelationshipException |
83 | 82 | * @throws ModelNotFoundException |
84 | 83 | * @throws NoClientException |
@@ -90,7 +89,6 @@ discard block |
||
90 | 89 | |
91 | 90 | /** |
92 | 91 | * @return HasMany |
93 | - |
|
94 | 92 | * @throws InvalidRelationshipException |
95 | 93 | * @throws ModelNotFoundException |
96 | 94 | * @throws NoClientException |
@@ -102,7 +100,6 @@ discard block |
||
102 | 100 | |
103 | 101 | /** |
104 | 102 | * @return HasMany |
105 | - |
|
106 | 103 | * @throws InvalidRelationshipException |
107 | 104 | * @throws ModelNotFoundException |
108 | 105 | * @throws NoClientException |
@@ -125,7 +122,6 @@ discard block |
||
125 | 122 | |
126 | 123 | /** |
127 | 124 | * @return HasMany |
128 | - |
|
129 | 125 | * @throws InvalidRelationshipException |
130 | 126 | * @throws ModelNotFoundException |
131 | 127 | * @throws NoClientException |
@@ -74,7 +74,6 @@ discard block |
||
74 | 74 | |
75 | 75 | /** |
76 | 76 | * @return HasMany |
77 | - |
|
78 | 77 | * @throws InvalidRelationshipException |
79 | 78 | * @throws ModelNotFoundException |
80 | 79 | * @throws NoClientException |
@@ -86,7 +85,6 @@ discard block |
||
86 | 85 | |
87 | 86 | /** |
88 | 87 | * @return HasMany |
89 | - |
|
90 | 88 | * @throws InvalidRelationshipException |
91 | 89 | * @throws ModelNotFoundException |
92 | 90 | * @throws NoClientException |
@@ -161,7 +159,6 @@ discard block |
||
161 | 159 | |
162 | 160 | /** |
163 | 161 | * @return HasMany |
164 | - |
|
165 | 162 | * @throws InvalidRelationshipException |
166 | 163 | * @throws ModelNotFoundException |
167 | 164 | * @throws NoClientException |
@@ -184,7 +181,6 @@ discard block |
||
184 | 181 | |
185 | 182 | /** |
186 | 183 | * @return HasMany |
187 | - |
|
188 | 184 | * @throws InvalidRelationshipException |
189 | 185 | * @throws ModelNotFoundException |
190 | 186 | * @throws NoClientException |
@@ -196,7 +192,6 @@ discard block |
||
196 | 192 | |
197 | 193 | /** |
198 | 194 | * @return HasMany |
199 | - |
|
200 | 195 | * @throws InvalidRelationshipException |
201 | 196 | * @throws ModelNotFoundException |
202 | 197 | * @throws NoClientException |
@@ -208,7 +203,6 @@ discard block |
||
208 | 203 | |
209 | 204 | /** |
210 | 205 | * @return HasMany |
211 | - |
|
212 | 206 | * @throws InvalidRelationshipException |
213 | 207 | * @throws ModelNotFoundException |
214 | 208 | * @throws NoClientException |
@@ -59,7 +59,6 @@ discard block |
||
59 | 59 | |
60 | 60 | /** |
61 | 61 | * @return HasMany |
62 | - |
|
63 | 62 | * @throws InvalidRelationshipException |
64 | 63 | * @throws ModelNotFoundException |
65 | 64 | * @throws NoClientException |
@@ -123,7 +122,6 @@ discard block |
||
123 | 122 | |
124 | 123 | /** |
125 | 124 | * @return HasMany |
126 | - |
|
127 | 125 | * @throws InvalidRelationshipException |
128 | 126 | * @throws ModelNotFoundException |
129 | 127 | * @throws NoClientException |
@@ -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 | ); |
@@ -89,7 +89,6 @@ |
||
89 | 89 | |
90 | 90 | /** |
91 | 91 | * @return HasMany |
92 | - |
|
93 | 92 | * @throws InvalidRelationshipException |
94 | 93 | * @throws ModelNotFoundException |
95 | 94 | * @throws NoClientException |
@@ -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() |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | |
161 | 161 | // Call API to get the response |
162 | 162 | $response = $this->getClient() |
163 | - ->request($this->getPath()); |
|
163 | + ->request($this->getPath()); |
|
164 | 164 | |
165 | 165 | // Peel off the key if exist |
166 | 166 | $response = $this->peelWrapperPropertyIfNeeded(Arr::wrap($response)); |
@@ -260,8 +260,8 @@ discard block |
||
260 | 260 | public function newInstance(): self |
261 | 261 | { |
262 | 262 | return (new static())->setClass($this->class) |
263 | - ->setClient($this->getClient()) |
|
264 | - ->setParent($this->parentModel); |
|
263 | + ->setClient($this->getClient()) |
|
264 | + ->setParent($this->parentModel); |
|
265 | 265 | } |
266 | 266 | |
267 | 267 | /** |
@@ -292,7 +292,7 @@ discard block |
||
292 | 292 | // Check for single response |
293 | 293 | if (array_key_exists( |
294 | 294 | $this->getModel() |
295 | - ->getResponseKey(), |
|
295 | + ->getResponseKey(), |
|
296 | 296 | $properties |
297 | 297 | )) { |
298 | 298 | return $properties[$this->getModel() |
@@ -302,7 +302,7 @@ discard block |
||
302 | 302 | // Check for collection of responses |
303 | 303 | if (array_key_exists( |
304 | 304 | $this->getModel() |
305 | - ->getResponseCollectionKey(), |
|
305 | + ->getResponseCollectionKey(), |
|
306 | 306 | $properties |
307 | 307 | )) { |
308 | 308 | return $properties[$this->getModel() |