Skip to content

Commit

Permalink
feat(classMap): 允许通过 @ignored 注释来忽略生成类映射表
Browse files Browse the repository at this point in the history
  • Loading branch information
twinh committed Sep 24, 2023
1 parent 00c673e commit d60e29e
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/ClassMap.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,14 @@ public function generate($dirs, $pattern, $type, $ignoreProject = true, $ignoreT
if (!$class) {
continue;
}
if ((new ReflectionClass($class))->isAbstract()) {

$reflection = new ReflectionClass($class);
if ($reflection->isAbstract()) {
continue;
}

// @experimental may be change to @wei-ignored
if (false !== strpos($reflection->getDocComment(), '@ignored')) {
continue;
}

Expand Down

0 comments on commit d60e29e

Please sign in to comment.