File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -189,7 +189,7 @@ public function findSpecifiedType(
189189 ) && $ scope ->isSpecified ($ expr );
190190 };
191191
192- if (count ($ sureTypes ) === 1 ) {
192+ if (count ($ sureTypes ) === 1 && count ( $ sureNotTypes ) === 0 ) {
193193 $ sureType = reset ($ sureTypes );
194194 if ($ isSpecified ($ sureType [0 ])) {
195195 return null ;
@@ -208,7 +208,7 @@ public function findSpecifiedType(
208208 }
209209
210210 return null ;
211- } elseif (count ($ sureNotTypes ) === 1 ) {
211+ } elseif (count ($ sureNotTypes ) === 1 && count ( $ sureTypes ) === 0 ) {
212212 $ sureNotType = reset ($ sureNotTypes );
213213 if ($ isSpecified ($ sureNotType [0 ])) {
214214 return null ;
@@ -227,7 +227,9 @@ public function findSpecifiedType(
227227 }
228228
229229 return null ;
230- } elseif (count ($ sureTypes ) > 0 ) {
230+ }
231+
232+ if (count ($ sureTypes ) > 0 ) {
231233 foreach ($ sureTypes as $ sureType ) {
232234 if ($ isSpecified ($ sureType [0 ])) {
233235 return null ;
@@ -239,7 +241,9 @@ public function findSpecifiedType(
239241 if ($ types instanceof NeverType) {
240242 return false ;
241243 }
242- } elseif (count ($ sureNotTypes ) > 0 ) {
244+ }
245+
246+ if (count ($ sureNotTypes ) > 0 ) {
243247 foreach ($ sureNotTypes as $ sureNotType ) {
244248 if ($ isSpecified ($ sureNotType [0 ])) {
245249 return null ;
You can’t perform that action at this time.
0 commit comments