You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// src/Phan/Parse/ParseVisitor.php// public function visitMethod(Node $node): Context
} elseif ('__tostring' === $method_name_lower) {
if (!$this->context->isStrictTypes()) {
$class->addAdditionalType(StringType::instance(false));
}
// In PHP 8 and later having a __toString method automatically adds the Stringable interface, #4476
if (Config::get_closest_minimum_target_php_version_id() >= 80000) {
// @phan-suppress-next-line PhanThrowTypeAbsentForCall should not happen, built in type$class->addAdditionalType(Type::fromFullyQualifiedString('\Stringable'));
}
}
<?php// b.php without strict_typesclassHasToString { publicfunction__toString() { return'x'; }}
This is because of the call to addAdditionalType
The text was updated successfully, but these errors were encountered: