name instanceof Identifier) { return null; } $varType = $scope->getType($expr->var); if (! (new ObjectType(HigherOrderExpectation::class))->isSuperTypeOf($varType)->yes()) { return null; } if (! $this->reflectionProvider->hasClass(HigherOrderExpectation::class)) { return null; } $propertyName = $expr->name->name; $classReflection = $this->reflectionProvider->getClass(HigherOrderExpectation::class); if (! $classReflection->hasNativeProperty($propertyName)) { return null; } return $varType->getProperty($propertyName, $scope)->getReadableType(); } }