Skip to content

Commit 52052c3

Browse files
committed
tests: fix failing tests reported by phpcs
1 parent 1735e1b commit 52052c3

File tree

3 files changed

+6
-9
lines changed

3 files changed

+6
-9
lines changed

src/Charcoal/CookieConsent/Model/Category.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class Category extends Content
2626
public function getHandle(): ?string
2727
{
2828
if (\is_null($this->handle) && $this->name) {
29-
$this->setHandle((string) $this->name);
29+
$this->setHandle((string)$this->name);
3030
}
3131

3232
return $this->handle;
@@ -165,7 +165,7 @@ protected function sanitizeKey($key): ?string
165165
':: Any-Latin; :: Latin-ASCII; :: NFD; :: [:Nonspacing Mark:] Remove; :: Lower(); :: NFC;',
166166
Transliterator::FORWARD
167167
);
168-
$key = $transliterator->transliterate((string) $key);
168+
$key = $transliterator->transliterate((string)$key);
169169
if (!$key) {
170170
return null;
171171
}

src/Charcoal/CookieConsent/Model/Structure/ConsentRevision.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,6 @@ public function setRevisionNumber($number): self
7676
*/
7777
protected function sanitizeRevisionNumber($number): int
7878
{
79-
return \min(0, \abs((int) $number));
79+
return \min(0, \abs((int)$number));
8080
}
8181
}

src/Charcoal/CookieConsent/Model/Structure/Link.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -175,17 +175,14 @@ public function isSupportedTarget($target): bool
175175
public function getHref()
176176
{
177177
switch ($this->getType()) {
178-
case self::TYPE_FILE: {
178+
case self::TYPE_FILE:
179179
return $this->getFilePath();
180-
}
181180

182-
case self::TYPE_MODEL: {
181+
case self::TYPE_MODEL:
183182
return $this->getModel()['url'];
184-
}
185183

186-
case self::TYPE_URL: {
184+
case self::TYPE_URL:
187185
return $this->getUrl();
188-
}
189186
}
190187

191188
return null;

0 commit comments

Comments
 (0)