@@ -76,7 +76,7 @@ public function __set(string $name, mixed $value): void
76
76
}
77
77
78
78
/**
79
- * @param array<int, Type> $types $types
79
+ * @param array<int, Type> $types $types
80
80
*/
81
81
private function validateTypes (array $ types ): void
82
82
{
@@ -137,12 +137,12 @@ private function detectType(mixed $value): void
137
137
return ;
138
138
}
139
139
140
- if (false === is_object ($ value )) {
140
+ if (is_object ($ value ) === false ) {
141
141
throw StrictusTypeException::becauseNotSupportedType (gettype ($ value ));
142
142
}
143
143
144
144
$ class = get_class ($ value );
145
- if (' stdClass ' === $ class ) {
145
+ if ($ class === ' stdClass ' ) {
146
146
$ this ->type = Type::OBJECT ;
147
147
148
148
return ;
@@ -170,11 +170,11 @@ private function detectType(mixed $value): void
170
170
*/
171
171
private function setInstance (string $ instance ): void
172
172
{
173
- if (null === $ this ->type ) {
173
+ if ($ this ->type === null ) {
174
174
throw StrictusTypeException::becauseNullInstanceType ();
175
175
}
176
176
177
- if (Type:: ENUM !== $ this ->type && Type::INSTANCE !== $ this ->type ) {
177
+ if ($ this ->type !== Type::ENUM && $ this ->type !== Type:: INSTANCE ) {
178
178
throw StrictusTypeException::becauseUnInstanceableType ();
179
179
}
180
180
@@ -203,11 +203,11 @@ private function getStrictusType(mixed $value): ?StrictusTypeInterface
203
203
204
204
private function getInstanceableStrictusType (mixed $ value ): StrictusTypeInterface
205
205
{
206
- if (null === $ this ->type ) {
206
+ if ($ this ->type === null ) {
207
207
throw StrictusTypeException::becauseInvalidSupportedType ();
208
208
}
209
209
210
- if (null === $ this ->instances || (! isset ($ this ->instances [$ this ->type ->name ]))) {
210
+ if ($ this ->instances === null || (! isset ($ this ->instances [$ this ->type ->name ]))) {
211
211
throw StrictusTypeException::becauseNullInstanceType ();
212
212
}
213
213
0 commit comments