Skip to content

Commit

Permalink
fix: Rewrote all api_resources config files with resources: prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
roadiz-ci committed Mar 26, 2024
1 parent 04759ed commit 4965c08
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
9 changes: 7 additions & 2 deletions src/EntityGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -247,10 +247,15 @@ protected function getClassAttributes(): string
*/
protected function getClassAnnotations(): string
{
$annotations = [
$this->nodeType->getName() . ' node-source entity.',
$this->nodeType->getDescription()
];
$annotations = array_filter($annotations);

return '
/**
* DO NOT EDIT
* Generated custom node-source type by Roadiz.
* ' . implode(PHP_EOL . ' * ', $annotations) . '
*/' . PHP_EOL;
}

Expand Down
3 changes: 1 addition & 2 deletions tests/mocks/GeneratedNodesSources/NSMock.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@
use ApiPlatform\Serializer\Filter\PropertyFilter;

/**
* DO NOT EDIT
* Generated custom node-source type by Roadiz.
* Mock node-source entity.
*/
#[
Gedmo\Loggable(logEntryClass: \RZ\Roadiz\CoreBundle\Entity\UserLogEntry::class),
Expand Down
3 changes: 1 addition & 2 deletions tests/mocks/GeneratedNodesSourcesWithRepository/NSMock.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@
use ApiPlatform\Serializer\Filter\PropertyFilter;

/**
* DO NOT EDIT
* Generated custom node-source type by Roadiz.
* Mock node-source entity.
*/
#[
Gedmo\Loggable(logEntryClass: \RZ\Roadiz\CoreBundle\Entity\UserLogEntry::class),
Expand Down

0 comments on commit 4965c08

Please sign in to comment.