Skip to content

Commit

Permalink
WIP: Fix phpstan
Browse files Browse the repository at this point in the history
  • Loading branch information
mhsdesign committed Jun 23, 2024
1 parent 694b621 commit 742b123
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public function processNode(Node $node, Scope $scope): array
$targetClassName,
$node->name->toString()
)
)->build(),
)->identifier('neos.internal')->build(),
];
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ public function listCommand(bool $verbose = false): void

$liveContentGraph = null;
try {
$liveContentGraph = $contentRepository->getContentGraph(WorkspaceName::forLive());
$liveContentGraph = $contentRepository?->getContentGraph(WorkspaceName::forLive());
} catch (WorkspaceDoesNotExist) {
$this->outputLine('<comment>Live workspace in content repository %s not existing.</comment>', [$contentRepositoryId->value]);
}
Expand All @@ -298,6 +298,7 @@ public function listCommand(bool $verbose = false): void
if ($sitesAggregate) {
$siteNodeAggregates = $liveContentGraph->findChildNodeAggregates($sitesAggregate->nodeAggregateId);
foreach ($siteNodeAggregates as $siteNodeAggregate) {
assert($siteNodeAggregate->nodeName !== null);
$currenSiteNodes[] = $siteNodeAggregate->nodeName->value;
}
}
Expand Down Expand Up @@ -340,6 +341,7 @@ public function listCommand(bool $verbose = false): void

if ($verbose) {
try {
/** @phpstan-ignore neos.internal */
$contentStreamsString = sprintf('%d found', iterator_count($contentRepository->getContentStreamFinder()->findAllIds()));
} catch (\RuntimeException $e) {
$this->outputLine('<comment>ContentStreamFinder of %s not functional: %s.</comment>', [$contentRepositoryId->value, $e->getMessage()]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ public function get(ContentRepositoryId $contentRepositoryId): ContentRepository
*/
public function getContentRepositoryIds(): iterable
{
/** @phpstan-ignore argument.type */
return array_map(ContentRepositoryId::fromString(...), array_keys($this->settings['contentRepositories'] ?? []));
}

Expand Down

0 comments on commit 742b123

Please sign in to comment.