Skip to content
Snippets Groups Projects
Commit 9d6a61d2 authored by Laurent Lecluse's avatar Laurent Lecluse
Browse files

Parsing des classes plus strict

parent 2e28dfea
No related branches found
No related tags found
No related merge requests found
......@@ -171,8 +171,11 @@ class IntrospectionService
{
$cti = $this->getCTI($namespace, $includeVendor);
foreach ($cti as $k => $c) {
if (!class_exists($c)) {
unset($cti[$k]);
if (@trait_exists($c) || @interface_exists($c)) {
continue;
}
if (!@class_exists($c)) {
throw new \Exception('La classe ' . $c . ' n\existe pas ou bien elle elle est introuvable');
}
}
......@@ -233,7 +236,7 @@ class IntrospectionService
}
}
if ($ok && (!$namespace || 0 === strpos($class, $namespace))) {
if ($ok && (!$namespace || str_starts_with($class, $namespace))) {
$map[] = $class;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment