diff --git a/src/Util/ExcludeList.php b/src/Util/ExcludeList.php index 7cfcf872a6d..91a5a66b412 100644 --- a/src/Util/ExcludeList.php +++ b/src/Util/ExcludeList.php @@ -30,7 +30,6 @@ use PHPUnit\Framework\TestCase; use Prophecy\Prophet; use ReflectionClass; -use ReflectionException; use SebastianBergmann\CliParser\Parser as CliParser; use SebastianBergmann\CodeCoverage\CodeCoverage; use SebastianBergmann\CodeUnit\CodeUnit; @@ -233,17 +232,7 @@ private function initialize(): void continue; } - try { - $directory = (new ReflectionClass($className))->getFileName(); - // @codeCoverageIgnoreStart - } catch (ReflectionException $e) { - throw new Exception( - $e->getMessage(), - (int) $e->getCode(), - $e - ); - } - // @codeCoverageIgnoreEnd + $directory = (new ReflectionClass($className))->getFileName(); for ($i = 0; $i < $parent; $i++) { $directory = dirname($directory);