mirror of
https://github.com/danog/psalm.git
synced 2025-01-21 21:31:13 +01:00
Move exception classes
This commit is contained in:
parent
6f0a6201de
commit
ddd287fb3d
@ -170,6 +170,16 @@ class TryAnalyzer
|
||||
$statements_analyzer->getAliases()
|
||||
);
|
||||
|
||||
if ($codebase->alter_code && $fq_catch_class) {
|
||||
$codebase->classlikes->handleClassLikeReferenceInMigration(
|
||||
$codebase,
|
||||
$statements_analyzer,
|
||||
$catch_type,
|
||||
$fq_catch_class,
|
||||
$context->calling_method_id
|
||||
);
|
||||
}
|
||||
|
||||
if ($original_context->check_classes) {
|
||||
if (ClassLikeAnalyzer::checkFullyQualifiedClassLikeName(
|
||||
$statements_analyzer,
|
||||
|
@ -280,6 +280,12 @@ class ClassMoveTest extends \Psalm\Tests\TestCase
|
||||
$b->bar();
|
||||
}
|
||||
|
||||
try {
|
||||
// something
|
||||
} catch (InvalidArgumentException $e) {
|
||||
|
||||
}
|
||||
|
||||
echo \A::class;
|
||||
|
||||
ArrayObject::foo();
|
||||
@ -306,6 +312,12 @@ class ClassMoveTest extends \Psalm\Tests\TestCase
|
||||
$b->bar();
|
||||
}
|
||||
|
||||
try {
|
||||
// something
|
||||
} catch (\InvalidArgumentException $e) {
|
||||
|
||||
}
|
||||
|
||||
echo self::class;
|
||||
|
||||
\ArrayObject::foo();
|
||||
|
Loading…
x
Reference in New Issue
Block a user