Skip to content

Commit

Permalink
TASK: Fix phpstan issues in FormDefinitionDataSource
Browse files Browse the repository at this point in the history
  • Loading branch information
ahaeslich committed Nov 9, 2023
1 parent 2c8ac2e commit 1964775
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
*/

use Neos\ContentRepository\Core\Projection\ContentGraph\Node;
use Neos\Form\Persistence\YamlPersistenceManager;
use Neos\Neos\Service\DataSource\AbstractDataSource;
use Neos\Flow\Annotations as Flow;

Expand All @@ -23,18 +24,15 @@ class FormDefinitionDataSource extends AbstractDataSource
*/
protected static $identifier = 'neos-nodetypes-form-definitions';

/**
* @Flow\Inject
* @var \Neos\Form\Persistence\YamlPersistenceManager
*/
protected $yamlPersistenceManager;
#[Flow\Inject]
protected YamlPersistenceManager $yamlPersistenceManager;

/**
* @param Node|null $node
* @param array $arguments
* @return \Neos\Flow\Persistence\QueryResultInterface
* @param array<mixed> $arguments
* @return array<int|string, array{label: mixed}>
*/
public function getData(Node $node = null, array $arguments = [])
public function getData(Node $node = null, array $arguments = []): array
{
$formDefinitions['']['label'] = '';
$forms = $this->yamlPersistenceManager->listForms();
Expand Down
1 change: 1 addition & 0 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ parameters:
- Neos.ContentRepository.TestSuite/Classes
- Neos.ContentRepositoryRegistry/Classes
- Neos.Neos/Classes
- Neos.NodeTypes.Navigation/Classes
bootstrapFiles:
- bootstrap-phpstan.php
rules:
Expand Down

0 comments on commit 1964775

Please sign in to comment.