@@ -152,28 +152,27 @@ public static function createDefaultType(int $fetchType): Type
152152 // this means we need to implement equals() and isSuperTypeOf().
153153 public function equals (Type $ type ): bool
154154 {
155- if (
156- $ type instanceof self
157- && $ type ->fetchType !== null
158- && $ type ->bothType !== null
159- && $ this ->bothType !== null
160- ) {
161- return $ type ->fetchType === $ this ->fetchType && $ type ->bothType ->equals ($ this ->bothType );
155+ if ($ type instanceof self) {
156+ return $ type ->fetchType !== null
157+ && $ type ->bothType !== null
158+ && $ this ->bothType !== null
159+ && $ type ->fetchType === $ this ->fetchType
160+ && $ type ->bothType ->equals (
161+ $ this ->bothType
162+ );
162163 }
163164
164165 return parent ::equals ($ type );
165166 }
166167
167168 public function isSuperTypeOf (Type $ type ): TrinaryLogic
168169 {
169- if (
170- $ type instanceof self
171- && $ type ->fetchType !== null
172- && $ type ->bothType !== null
173- && $ this ->bothType !== null
174- ) {
170+ if ($ type instanceof self) {
175171 return TrinaryLogic::createFromBoolean (
176- $ type ->fetchType === $ this ->fetchType
172+ $ type ->fetchType !== null
173+ && $ type ->bothType !== null
174+ && $ this ->bothType !== null
175+ && $ type ->fetchType === $ this ->fetchType
177176 && $ type ->bothType ->equals ($ this ->bothType )
178177 );
179178 }
0 commit comments