Skip to content

Commit

Permalink
Added AOP that can act on enum (#6895)
Browse files Browse the repository at this point in the history
  • Loading branch information
assert6 authored Jun 25, 2024
1 parent 4fe610a commit d430124
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Annotation/AnnotationTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ public function collectClass(string $className): void
AnnotationCollector::collectClass($className, static::class, $this);
}

public function collectClassConstant(string $className, ?string $target): void
{
AnnotationCollector::collectClassConstant($className, $target, static::class, $this);
}

public function collectMethod(string $className, ?string $target): void
{
AnnotationCollector::collectMethod($className, $target, static::class, $this);
Expand Down
7 changes: 7 additions & 0 deletions src/Annotation/MultipleAnnotationTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@ public function collectClass(string $className): void
AnnotationCollector::collectClass($className, static::class, $this->formatAnnotation($annotation));
}

public function collectClassConstant(string $className, ?string $target): void
{
$annotation = AnnotationCollector::getClassConstantAnnotation($className, $target)[static::class] ?? null;

AnnotationCollector::collectClassConstant($className, $target, static::class, $this->formatAnnotation($annotation));
}

public function collectMethod(string $className, ?string $target): void
{
$annotation = AnnotationCollector::getClassMethodAnnotation($className, $target)[static::class] ?? null;
Expand Down

0 comments on commit d430124

Please sign in to comment.