Passed
Push — master ( d9944b...f2d14c )
by Jimmy
03:00 queued 45s
created
src/Concerns/HasClickUp.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -36,12 +36,12 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
src/Webhook.php 1 patch
Indentation   -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,6 @@
 block discarded – undo
47 47
 
48 48
     /**
49 49
      * @return BelongsTo
50
-
51 50
      * @throws InvalidRelationshipException
52 51
      * @throws ModelNotFoundException
53 52
      * @throws NoClientException
Please login to merge, or discard this patch.
src/Task.php 1 patch
Indentation   -3 removed lines patch added patch discarded remove patch
@@ -80,7 +80,6 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
271 269
 
272 270
     /**
273 271
      * @return HasMany
274
-
275 272
      * @throws InvalidRelationshipException
276 273
      * @throws ModelNotFoundException
277 274
      * @throws NoClientException
Please login to merge, or discard this patch.
src/Space.php 1 patch
Indentation   -4 removed lines patch added patch discarded remove patch
@@ -78,7 +78,6 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
125 122
 
126 123
     /**
127 124
      * @return HasMany
128
-
129 125
      * @throws InvalidRelationshipException
130 126
      * @throws ModelNotFoundException
131 127
      * @throws NoClientException
Please login to merge, or discard this patch.
src/TaskList.php 1 patch
Indentation   -6 removed lines patch added patch discarded remove patch
@@ -74,7 +74,6 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
208 203
 
209 204
     /**
210 205
      * @return HasMany
211
-
212 206
      * @throws InvalidRelationshipException
213 207
      * @throws ModelNotFoundException
214 208
      * @throws NoClientException
Please login to merge, or discard this patch.
src/View.php 1 patch
Indentation   -2 removed lines patch added patch discarded remove patch
@@ -59,7 +59,6 @@  discard block
 block discarded – undo
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
 block discarded – undo
123 122
 
124 123
     /**
125 124
      * @return HasMany
126
-
127 125
      * @throws InvalidRelationshipException
128 126
      * @throws ModelNotFoundException
129 127
      * @throws NoClientException
Please login to merge, or discard this patch.
src/Providers/ClientServiceProvider.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -63,14 +63,14 @@
 block discarded – undo
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
         );
Please login to merge, or discard this patch.
src/Support/Model.php 2 patches
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -240,7 +240,7 @@  discard block
 block discarded – undo
240 240
         $foreignKey = is_null($foreignKey) ? $this->assumeForeignKey($related) : $foreignKey;
241 241
 
242 242
         $builder = (new Builder())->setClass($related)
243
-                                  ->setClient($this->getClient());
243
+                                    ->setClient($this->getClient());
244 244
 
245 245
         return new BelongsTo($builder, $this, $foreignKey);
246 246
     }
@@ -261,8 +261,8 @@  discard block
 block discarded – undo
261 261
         $foreignKey = is_null($foreignKey) ? $this->assumeForeignKey($related) : $foreignKey;
262 262
 
263 263
         $builder = (new Builder())->setClass($related)
264
-                                  ->setClient($this->getClient())
265
-                                  ->setParent($this);
264
+                                    ->setClient($this->getClient())
265
+                                    ->setParent($this);
266 266
 
267 267
         return new ChildOf($builder, $this, $foreignKey);
268 268
     }
@@ -283,7 +283,7 @@  discard block
 block discarded – undo
283 283
 
284 284
         try {
285 285
             $this->getClient()
286
-                 ->delete($this->getPath());
286
+                    ->delete($this->getPath());
287 287
 
288 288
             return true;
289 289
         } catch (GuzzleException $e) {
@@ -487,7 +487,7 @@  discard block
 block discarded – undo
487 487
     public function givenOne($related, $attributes, $reset = false): Model
488 488
     {
489 489
         return (new $related([], $this->parentModel))->setClient($this->getClient())
490
-                                                     ->newFromBuilder($reset ? reset($attributes) : $attributes);
490
+                                                        ->newFromBuilder($reset ? reset($attributes) : $attributes);
491 491
     }
492 492
 
493 493
     /**
@@ -503,8 +503,8 @@  discard block
 block discarded – undo
503 503
     public function hasMany($related): HasMany
504 504
     {
505 505
         $builder = (new Builder())->setClass($related)
506
-                                  ->setClient($this->getClient())
507
-                                  ->setParent($this);
506
+                                    ->setClient($this->getClient())
507
+                                    ->setParent($this);
508 508
 
509 509
         return new HasMany($builder, $this);
510 510
     }
@@ -652,7 +652,7 @@  discard block
 block discarded – undo
652 652
 
653 653
             if ($this->exists) {
654 654
                 $response = $this->getClient()
655
-                                 ->put($this->getPath(), $this->getDirty());
655
+                                    ->put($this->getPath(), $this->getDirty());
656 656
 
657 657
                 // Record the changes
658 658
                 $this->syncChanges();
@@ -664,7 +664,7 @@  discard block
 block discarded – undo
664 664
             }
665 665
 
666 666
             $response = $this->getClient()
667
-                             ->post($this->getPath(), $this->toArray());
667
+                                ->post($this->getPath(), $this->toArray());
668 668
 
669 669
             $this->exists = true;
670 670
 
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
src/Support/Builder.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
 
148 148
         // Call API to get the response
149 149
         $response = $this->getClient()
150
-                         ->request($this->getPath());
150
+                            ->request($this->getPath());
151 151
 
152 152
         // Peel off the key if exist
153 153
         $response = $this->peelWrapperPropertyIfNeeded($response);
@@ -247,8 +247,8 @@  discard block
 block discarded – undo
247 247
     public function newInstance(): self
248 248
     {
249 249
         return (new static())->setClass($this->class)
250
-                             ->setClient($this->getClient())
251
-                             ->setParent($this->parentModel);
250
+                                ->setClient($this->getClient())
251
+                                ->setParent($this->parentModel);
252 252
     }
253 253
 
254 254
     /**
@@ -279,7 +279,7 @@  discard block
 block discarded – undo
279 279
         // Check for single response
280 280
         if (array_key_exists(
281 281
             $this->getModel()
282
-                 ->getResponseKey(),
282
+                    ->getResponseKey(),
283 283
             $properties
284 284
         )) {
285 285
             return $properties[$this->getModel()
@@ -289,7 +289,7 @@  discard block
 block discarded – undo
289 289
         // Check for collection of responses
290 290
         if (array_key_exists(
291 291
             $this->getModel()
292
-                 ->getResponseCollectionKey(),
292
+                    ->getResponseCollectionKey(),
293 293
             $properties
294 294
         )) {
295 295
             return $properties[$this->getModel()
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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()
Please login to merge, or discard this patch.