Skip to content

Commit ba29ff1

Browse files
committed
fix mixed return type
1 parent fb2a4d5 commit ba29ff1

File tree

5 files changed

+6
-5
lines changed

5 files changed

+6
-5
lines changed

src/Entity/Content.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,7 @@ public function getTaxonomyValues(): array
519519
return $taxonomyValues;
520520
}
521521

522-
public function getFieldValue(string $fieldName): array|mixed|null
522+
public function getFieldValue(string $fieldName): mixed
523523
{
524524
if ($this->hasField($fieldName) === false) {
525525
return null;

src/Entity/Field.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ public function isNew(): bool
243243
/**
244244
* like getValue() but returns single value for single value fields
245245
*/
246-
public function getParsedValue(): array|mixed|null
246+
public function getParsedValue(): mixed
247247
{
248248
$value = $this->getValue();
249249
if (is_iterable($value)) {

src/Entity/Field/CheckboxField.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
use Bolt\Entity\Field;
88
use Bolt\Entity\FieldInterface;
99
use Doctrine\ORM\Mapping as ORM;
10+
use Twig\Markup;
1011

1112
/**
1213
* @ORM\Entity
@@ -37,7 +38,7 @@ public function setValue($value): Field
3738
return parent::setValue($value);
3839
}
3940

40-
public function getTwigValue()
41+
public function getTwigValue(): string|array|Markup|bool
4142
{
4243
return current($this->getValue()) ? true : false;
4344
}

src/Entity/Field/SelectField.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public function getValue(): ?array
5656
return array_filter((array) $value);
5757
}
5858

59-
public function getParsedValue()
59+
public function getParsedValue(): mixed
6060
{
6161
$parsedValue = parent::getParsedValue();
6262

src/Event/Subscriber/AuthSubscriber.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public function onAuthenticationSuccess(AuthenticationSuccessEvent $event): void
5252

5353
public function onLogout(LogoutEvent $event): void
5454
{
55-
if (null === $event->getToken()) {
55+
if ($event->getToken() === null) {
5656
return;
5757
}
5858

0 commit comments

Comments
 (0)