Passed
Branch main (904efe)
by Diego
05:13 queued 01:42
created
src/Repository/Issues/Issues.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
     public function getChildren(Issue $issue): IdentityCollection | ArrayCollection
114 114
     {
115 115
         return $this->client->getRepository(self::API_ROOT)
116
-            ?->addFilter(self::ISSUE_FILTER_PARENT_ID, $issue->getId())
116
+            ? ->addFilter(self::ISSUE_FILTER_PARENT_ID, $issue->getId())
117 117
             ->addFilter(self::ISSUE_FILTER_STATUS_ID, "*")
118 118
             ->search();
119 119
     }
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
      */
127 127
     public function addAttachment(Issue $issue, Attachment $attachment): Issue
128 128
     {
129
-        $attachment = $this->client->getRepository(Uploads::API_ROOT)?->create($attachment);
129
+        $attachment = $this->client->getRepository(Uploads::API_ROOT) ? ->create($attachment);
130 130
         if ($attachment) {
131 131
             $attachment->setVersion($issue->getFixedVersion());
132 132
             $issue->addAttachment($attachment);
Please login to merge, or discard this patch.
src/Repository/Issues/Statuses.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -21,26 +21,26 @@
 block discarded – undo
21 21
 
22 22
     public function get(mixed $id): ?AbstractModel
23 23
     {
24
-        throw new Error("Method "  . __FUNCTION__ . " not implemented for apì: " . self::API_ROOT);
24
+        throw new Error("Method " . __FUNCTION__ . " not implemented for apì: " . self::API_ROOT);
25 25
     }
26 26
 
27 27
     public function search(array $params = []): ArrayCollection
28 28
     {
29
-        throw new Error("Method "  . __FUNCTION__ . "not implemented for apì: " . self::API_ROOT);
29
+        throw new Error("Method " . __FUNCTION__ . "not implemented for apì: " . self::API_ROOT);
30 30
     }
31 31
 
32 32
     public function create(AbstractModel $model): ?AbstractModel
33 33
     {
34
-        throw new Error("Method "  . __FUNCTION__ . " not implemented for apì: " . self::API_ROOT);
34
+        throw new Error("Method " . __FUNCTION__ . " not implemented for apì: " . self::API_ROOT);
35 35
     }
36 36
 
37 37
     public function update(AbstractModel $model): ?AbstractModel
38 38
     {
39
-        throw new Error("Method "  . __FUNCTION__ . " not implemented for apì: " . self::API_ROOT);
39
+        throw new Error("Method " . __FUNCTION__ . " not implemented for apì: " . self::API_ROOT);
40 40
     }
41 41
 
42 42
     public function delete(AbstractModel $model): void
43 43
     {
44
-        throw new Error("Method "  . __FUNCTION__ . " not implemented for apì: " . self::API_ROOT);
44
+        throw new Error("Method " . __FUNCTION__ . " not implemented for apì: " . self::API_ROOT);
45 45
     }
46 46
 }
Please login to merge, or discard this patch.
src/Repository/Issues/Relations.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -21,21 +21,21 @@
 block discarded – undo
21 21
 
22 22
     public function create(AbstractModel $model): ?AbstractModel
23 23
     {
24
-        throw new Error("Method "  . __FUNCTION__ . "not implemented for apì: " . self::API_ROOT);
24
+        throw new Error("Method " . __FUNCTION__ . "not implemented for apì: " . self::API_ROOT);
25 25
     }
26 26
 
27 27
     public function search(array $params = []): ArrayCollection
28 28
     {
29
-        throw new Error("Method "  . __FUNCTION__ . "not implemented for apì: " . self::API_ROOT);
29
+        throw new Error("Method " . __FUNCTION__ . "not implemented for apì: " . self::API_ROOT);
30 30
     }
31 31
 
32 32
     public function update(AbstractModel $model): ?AbstractModel
33 33
     {
34
-        throw new Error("Method "  . __FUNCTION__ . " not implemented for apì: " . self::API_ROOT);
34
+        throw new Error("Method " . __FUNCTION__ . " not implemented for apì: " . self::API_ROOT);
35 35
     }
36 36
 
37 37
     public function all(?string $endpoint = null): ArrayCollection
38 38
     {
39
-        throw new Error("Method "  . __FUNCTION__ . " not implemented for apì: " . self::API_ROOT);
39
+        throw new Error("Method " . __FUNCTION__ . " not implemented for apì: " . self::API_ROOT);
40 40
     }
41 41
 }
Please login to merge, or discard this patch.
src/Repository/CacheableRepository.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
     public function get(mixed $id): ?AbstractModel
48 48
     {
49 49
         $cache_key = $this->generator->generate($this->repository->getModelClass(), $id);
50
-        return $this->cache->get($cache_key, function (ItemInterface $item) use ($id) {
50
+        return $this->cache->get($cache_key, function(ItemInterface $item) use ($id) {
51 51
             $model = $this->repository->get($id);
52 52
             if ($model) {
53 53
                 $item->set($model);
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
     public function create(AbstractModel $model): ?AbstractModel
69 69
     {
70 70
         $model = $this->repository->create($model);
71
-        if ($model?->isCacheable()) {
71
+        if ($model ? ->isCacheable()) {
72 72
             return $this->cacheModel($model);
73 73
         }
74 74
 
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
     public function update(AbstractModel $model): ?AbstractModel
85 85
     {
86 86
         $model = $this->repository->update($model);
87
-        if ($model?->isCacheable()) {
87
+        if ($model ? ->isCacheable()) {
88 88
             return $this->cacheModel($model);
89 89
         }
90 90
 
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
             json_encode(static::$filter_params, JSON_THROW_ON_ERROR)
121 121
         );
122 122
 
123
-        return $this->cache->get($cache_key, function (ItemInterface $item) {
123
+        return $this->cache->get($cache_key, function(ItemInterface $item) {
124 124
             $search_results = $this->doSearch();
125 125
             if (!$search_results->isEmpty()) {
126 126
                 $item->set($search_results);
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
         $cache_key = $this->generator->generate($model->getEntityName(), $model->getId());
167 167
 
168 168
         $this->cache->delete($cache_key);
169
-        return $this->cache->get($cache_key, function (ItemInterface $item) use ($model) {
169
+        return $this->cache->get($cache_key, function(ItemInterface $item) use ($model) {
170 170
             $item->set($model);
171 171
             $item->expiresAfter($this->getCacheTTL());
172 172
             if ($this->supportsTagging()) {
Please login to merge, or discard this patch.
src/Repository/Uploads.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -59,26 +59,26 @@
 block discarded – undo
59 59
 
60 60
     public function get(mixed $id): ?AbstractModel
61 61
     {
62
-        throw new Error("Method "  . __FUNCTION__ . " not implemented for apì: " . self::API_ROOT);
62
+        throw new Error("Method " . __FUNCTION__ . " not implemented for apì: " . self::API_ROOT);
63 63
     }
64 64
 
65 65
     public function search(array $params = []): ArrayCollection
66 66
     {
67
-        throw new Error("Method "  . __FUNCTION__ . "not implemented for apì: " . self::API_ROOT);
67
+        throw new Error("Method " . __FUNCTION__ . "not implemented for apì: " . self::API_ROOT);
68 68
     }
69 69
 
70 70
     public function update(AbstractModel $model): ?AbstractModel
71 71
     {
72
-        throw new Error("Method "  . __FUNCTION__ . " not implemented for apì: " . self::API_ROOT);
72
+        throw new Error("Method " . __FUNCTION__ . " not implemented for apì: " . self::API_ROOT);
73 73
     }
74 74
 
75 75
     public function delete(AbstractModel $model): void
76 76
     {
77
-        throw new Error("Method "  . __FUNCTION__ . " not implemented for apì: " . self::API_ROOT);
77
+        throw new Error("Method " . __FUNCTION__ . " not implemented for apì: " . self::API_ROOT);
78 78
     }
79 79
 
80 80
     public function all(?string $endpoint = null): ArrayCollection
81 81
     {
82
-        throw new Error("Method "  . __FUNCTION__ . " not implemented for apì: " . self::API_ROOT);
82
+        throw new Error("Method " . __FUNCTION__ . " not implemented for apì: " . self::API_ROOT);
83 83
     }
84 84
 }
Please login to merge, or discard this patch.
src/Repository/RepositoryTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -102,7 +102,7 @@
 block discarded – undo
102 102
         if ($this->isRelationAdder($method)) {
103 103
             $relation = Inflect::pluralize(strtolower(Inflect::snakeize(substr($method, 3))));
104 104
             if ($args[0] instanceof AbstractModel && $args[1] instanceof AbstractModel) {
105
-                $endpoint = $this->getEndpoint() . "/" . $args[0]->getId() . "/" . $relation .  "." . $this->client->getFormat();
105
+                $endpoint = $this->getEndpoint() . "/" . $args[0]->getId() . "/" . $relation . "." . $this->client->getFormat();
106 106
                 $response = $this->client->post($endpoint, json_encode($args[1]->getPayload(), JSON_THROW_ON_ERROR));
107 107
 
108 108
                 if ($response->isSuccess()) {
Please login to merge, or discard this patch.
src/Repository/Projects/Projects.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
     public function addTimeEntry(Project $project, TimeEntry $time_entry): Project
72 72
     {
73 73
         $time_entry->setProject($project);
74
-        $this->client->getRepository(TimeEntries::API_ROOT)?->create($time_entry);
74
+        $this->client->getRepository(TimeEntries::API_ROOT) ? ->create($time_entry);
75 75
 
76 76
         return $project;
77 77
     }
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
      */
117 117
     public function addFile(Project $project, File $file): Project
118 118
     {
119
-        $file = $this->client->getRepository(Uploads::API_ROOT)?->create($file);
119
+        $file = $this->client->getRepository(Uploads::API_ROOT) ? ->create($file);
120 120
         if ($file) {
121 121
             $file->setVersion($project->getDefaultVersion());
122 122
 
Please login to merge, or discard this patch.
src/Repository/Projects/WikiPages.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -138,7 +138,7 @@
 block discarded – undo
138 138
      */
139 139
     public function addAttachment(WikiPage $wiki_page, Attachment $attachment): WikiPage
140 140
     {
141
-        $attachment = $this->client->getRepository(Uploads::API_ROOT)?->create($attachment);
141
+        $attachment = $this->client->getRepository(Uploads::API_ROOT) ? ->create($attachment);
142 142
         if ($attachment) {
143 143
             $wiki_page->addAttachment($attachment);
144 144
         }
Please login to merge, or discard this patch.
src/Factory/MetaFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
     private function getFactoryFor(string $model_class, ?string $custom_endpoint): FactoryInterface
58 58
     {
59 59
         $repository_class = $model_class::getRepositoryClass();
60
-        $values = $this->client->getRepository($repository_class::API_ROOT)?->all($custom_endpoint)->toArray();
60
+        $values = $this->client->getRepository($repository_class::API_ROOT) ? ->all($custom_endpoint)->toArray();
61 61
 
62 62
         return new NamedIdentityFactory($values, $model_class);
63 63
     }
Please login to merge, or discard this patch.