Merge branch 'v2.0.0b' of https://git.mcnd.ca/mcndave/notes into v2.0.0b

This commit is contained in:
Dave Mc Nicoll 2024-10-29 16:00:36 +00:00
commit 08c0ffacab
3 changed files with 20 additions and 12 deletions

View File

@ -99,6 +99,8 @@ class AnnotationReader
case $reflect instanceof ReflectionClass :
return $reflect->name;
}
return "#UNKNOWN#";
}
protected function getObjectNamespace(Reflector $reflect) : string

View File

@ -10,6 +10,8 @@ use RuntimeException, DirectoryIterator, Generator;
class Breadcrumb extends RouteFetcher {
public bool $ignoreSoleRoute = true;
public function getRouteTree(\Notes\Route\Attribute\Method\Route $route) : array
{
$tree = [];
@ -36,7 +38,11 @@ class Breadcrumb extends RouteFetcher {
else {
$route = null;
}
};
}
if ($this->ignoreSoleRoute && count($tree) === 1) {
return [];
}
return array_reverse($tree);
}