Skip to content

Commit 81f8e28

Browse files
committed
Linter changes
1 parent 8b748e5 commit 81f8e28

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

src/Concerns/StrictusTyping.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ private function validate(mixed $value): void
7070

7171
private function immutableValidate(): void
7272
{
73-
if (false === $this->immutable) {
73+
if ($this->immutable === false) {
7474
return;
7575
}
7676

src/Types/StrictusEnum.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public function __construct(private string $enumType, private mixed $value, priv
3030

3131
private function validate(mixed $value): void
3232
{
33-
if (false === enum_exists($this->enumType)) {
33+
if (enum_exists($this->enumType) === false) {
3434
throw new StrictusTypeException('Invalid Enum Type');
3535
}
3636

src/Types/StrictusUnion.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public function __set(string $name, mixed $value): void
7676
}
7777

7878
/**
79-
* @param array<int, Type> $types $types
79+
* @param array<int, Type> $types $types
8080
*/
8181
private function validateTypes(array $types): void
8282
{
@@ -137,12 +137,12 @@ private function detectType(mixed $value): void
137137
return;
138138
}
139139

140-
if (false === is_object($value)) {
140+
if (is_object($value) === false) {
141141
throw StrictusTypeException::becauseNotSupportedType(gettype($value));
142142
}
143143

144144
$class = get_class($value);
145-
if ('stdClass' === $class) {
145+
if ($class === 'stdClass') {
146146
$this->type = Type::OBJECT;
147147

148148
return;
@@ -170,11 +170,11 @@ private function detectType(mixed $value): void
170170
*/
171171
private function setInstance(string $instance): void
172172
{
173-
if (null === $this->type) {
173+
if ($this->type === null) {
174174
throw StrictusTypeException::becauseNullInstanceType();
175175
}
176176

177-
if (Type::ENUM !== $this->type && Type::INSTANCE !== $this->type) {
177+
if ($this->type !== Type::ENUM && $this->type !== Type::INSTANCE) {
178178
throw StrictusTypeException::becauseUnInstanceableType();
179179
}
180180

@@ -203,11 +203,11 @@ private function getStrictusType(mixed $value): ?StrictusTypeInterface
203203

204204
private function getInstanceableStrictusType(mixed $value): StrictusTypeInterface
205205
{
206-
if (null === $this->type) {
206+
if ($this->type === null) {
207207
throw StrictusTypeException::becauseInvalidSupportedType();
208208
}
209209

210-
if (null === $this->instances || (! isset($this->instances[$this->type->name]))) {
210+
if ($this->instances === null || (! isset($this->instances[$this->type->name]))) {
211211
throw StrictusTypeException::becauseNullInstanceType();
212212
}
213213

0 commit comments

Comments
 (0)