Skip to content

Commit

Permalink
hook param as well
Browse files Browse the repository at this point in the history
  • Loading branch information
TomasVotruba committed Oct 15, 2022
1 parent 1663e78 commit a149cea
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,7 @@ use Doctrine\ORM\Mapping\JoinColumns;
final class DoctrineNestedJoinColumnsPromotedProperty
{
public function __construct(
#[JoinColumn(name: "entity_id", referencedColumnName: "id")]
#[JoinColumn(name: "entity_type", referencedColumnName: "entity_type")]
protected $page,
#[JoinColumn(name: 'entity_id', referencedColumnName: 'id')] #[JoinColumn(name: 'entity_type', referencedColumnName: 'entity_type')] protected $page,
) {
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,14 +100,16 @@ class SomeEntity
*/
public function getNodeTypes(): array
{
return [Property::class, Class_::class];
return [Property::class, Class_::class, Node\Param::class];
}

/**
* @param Property|Class_ $node
* @param Property|Class_|Node\Param $node
*/
public function refactor(Node $node): ?Node
{
print_node($node);

$phpDocInfo = $this->phpDocInfoFactory->createFromNode($node);
if (! $phpDocInfo instanceof PhpDocInfo) {
return null;
Expand Down Expand Up @@ -146,6 +148,8 @@ public function provideMinPhpVersion(): int
*/
private function transformDoctrineAnnotationClassesToAttributeGroups(PhpDocInfo $phpDocInfo, array $uses): array
{
dump($phpDocInfo->getPhpDocNode()->children);

if ($phpDocInfo->getPhpDocNode()->children === []) {
return [];
}
Expand Down

0 comments on commit a149cea

Please sign in to comment.