diff --git a/src/Collection/ImmutableCollection.php b/src/Collection/ImmutableCollection.php index cbcd304..b37a36f 100644 --- a/src/Collection/ImmutableCollection.php +++ b/src/Collection/ImmutableCollection.php @@ -16,7 +16,7 @@ public function add($element) throw new \LogicException(\sprintf('Method %s is not available on immutable collections', __FUNCTION__)); } - public function offsetSet(mixed $key, mixed $value): void + public function offsetSet(mixed $offset, mixed $value): void { throw new \LogicException(\sprintf('Method %s is not available on immutable collections', __FUNCTION__)); } diff --git a/src/Value/Locale.php b/src/Value/Locale.php index f780e1d..fa8335a 100644 --- a/src/Value/Locale.php +++ b/src/Value/Locale.php @@ -4,6 +4,7 @@ use Doctrine\ORM\Mapping\Column; use Doctrine\ORM\Mapping\Embeddable; +use Doctrine\ORM\Mapping\Embedded; use MyOnlineStore\Common\Domain\Exception\InvalidArgument; /** @psalm-immutable */ @@ -13,11 +14,11 @@ final class Locale public const FALLBACK_FRONTEND_LOCALE = 'en_GB'; /** @var RegionCode */ - #[Embedded(class: 'MyOnlineStore\Common\Domain\Value\RegionCode', columnPrefix: false)] + #[Embedded(class: RegionCode::class, columnPrefix: false)] private $regionCode; /** @var LanguageCode */ - #[Embedded(class: 'MyOnlineStore\Common\Domain\Value\LanguageCode', columnPrefix: false)] + #[Embedded(class: LanguageCode::class, columnPrefix: false)] private $languageCode; public function __construct(LanguageCode $languageCode, RegionCode $regionCode) diff --git a/src/Value/Location/Address/Street.php b/src/Value/Location/Address/Street.php index 4a71c9a..4140d3b 100644 --- a/src/Value/Location/Address/Street.php +++ b/src/Value/Location/Address/Street.php @@ -5,6 +5,7 @@ use Doctrine\ORM\Mapping\Column; use Doctrine\ORM\Mapping\Embeddable; +use Doctrine\ORM\Mapping\Embedded; use MyOnlineStore\Common\Domain\Exception\InvalidArgument; /** @psalm-immutable */ @@ -57,6 +58,7 @@ public static function fromSingleLine(string $streetAddress): self public function equals(self $operand): bool { + /** @palm-supress RiskyTruthyFalsyComparison */ return $this->name->equals($operand->name) && $this->number->equals($operand->number) && $this->suffix === $operand->suffix; @@ -79,6 +81,7 @@ public function getSuffix(): StreetSuffix | null public function __toString(): string { + /** @palm-supress RiskyTruthyFalsyComparison */ return \trim(\sprintf('%s %s %s', $this->name, $this->number, $this->suffix ?: '')); } } diff --git a/src/Value/Money/Money.php b/src/Value/Money/Money.php index a6f2084..decfae3 100644 --- a/src/Value/Money/Money.php +++ b/src/Value/Money/Money.php @@ -5,6 +5,7 @@ use Doctrine\ORM\Mapping\Column; use Doctrine\ORM\Mapping\Embeddable; +use Doctrine\ORM\Mapping\Embedded; use MyOnlineStore\Common\Domain\Value\Arithmetic\Amount; /** @psalm-immutable */ diff --git a/src/Value/Person/Name.php b/src/Value/Person/Name.php index 4ec2027..9d0872b 100644 --- a/src/Value/Person/Name.php +++ b/src/Value/Person/Name.php @@ -5,6 +5,7 @@ use Doctrine\ORM\Mapping\Column; use Doctrine\ORM\Mapping\Embeddable; +use Doctrine\ORM\Mapping\Embedded; use MyOnlineStore\Common\Domain\Value\Person\Name\FirstName; use MyOnlineStore\Common\Domain\Value\Person\Name\LastName;