mirror of
https://github.com/danog/psalm.git
synced 2025-01-22 05:41:20 +01:00
Fix typecercion issues
This commit is contained in:
parent
0ec83a24d4
commit
8fc0b43973
@ -126,6 +126,7 @@ class ClassLikes
|
||||
|
||||
foreach ($predefined_classes as $predefined_class) {
|
||||
$predefined_class = preg_replace('/^\\\/', '', $predefined_class);
|
||||
/** @psalm-suppress TypeCoercion */
|
||||
$reflection_class = new \ReflectionClass($predefined_class);
|
||||
|
||||
if (!$reflection_class->isUserDefined()) {
|
||||
@ -140,6 +141,7 @@ class ClassLikes
|
||||
|
||||
foreach ($predefined_interfaces as $predefined_interface) {
|
||||
$predefined_interface = preg_replace('/^\\\/', '', $predefined_interface);
|
||||
/** @psalm-suppress TypeCoercion */
|
||||
$reflection_class = new \ReflectionClass($predefined_interface);
|
||||
|
||||
if (!$reflection_class->isUserDefined()) {
|
||||
|
@ -502,6 +502,7 @@ class Scanner
|
||||
echo 'Using reflection to get metadata for ' . $fq_classlike_name . "\n";
|
||||
}
|
||||
|
||||
/** @psalm-suppress TypeCoercion */
|
||||
$reflected_class = new \ReflectionClass($fq_classlike_name);
|
||||
$this->reflection->registerClass($reflected_class);
|
||||
$this->reflected_classlikes_lc[$fq_classlike_name_lc] = true;
|
||||
@ -704,6 +705,7 @@ class Scanner
|
||||
echo 'Using reflection to locate file for ' . $fq_class_name . "\n";
|
||||
}
|
||||
|
||||
/** @psalm-suppress TypeCoercion */
|
||||
$reflected_class = new \ReflectionClass($fq_class_name);
|
||||
} catch (\ReflectionException $e) {
|
||||
error_reporting($old_level);
|
||||
|
Loading…
x
Reference in New Issue
Block a user