diff --git a/Classes/Controller/BackendController.php b/Classes/Controller/BackendController.php index a70a803b48..964e2e9c47 100644 --- a/Classes/Controller/BackendController.php +++ b/Classes/Controller/BackendController.php @@ -172,6 +172,9 @@ public function indexAction(string $node = null) $rootNodeAggregate = $contentGraph->findRootNodeAggregateByType( NodeTypeNameFactory::forSites() ); + if (!$rootNodeAggregate) { + throw new \RuntimeException(sprintf('No sites root node found in content repository "%s", while fetching site node "%s"', $contentRepository->id->value, $siteDetectionResult->siteNodeName->value), 1724849303); + } $rootNode = $rootNodeAggregate->getNodeByCoveredDimensionSpacePoint($defaultDimensionSpacePoint); $siteNode = $subgraph->findNodeByPath( diff --git a/Classes/Controller/BackendServiceController.php b/Classes/Controller/BackendServiceController.php index 0ae563b848..2ad2734943 100644 --- a/Classes/Controller/BackendServiceController.php +++ b/Classes/Controller/BackendServiceController.php @@ -164,7 +164,7 @@ protected function initializeController(ActionRequest $request, ActionResponse $ /** * Apply a set of changes to the system - * @psalm-param list> $changes + * @phpstan-param list> $changes */ public function changeAction(array $changes): void { @@ -521,7 +521,7 @@ public function changeBaseWorkspaceAction(string $targetWorkspaceName, string $d /** * Persists the clipboard node on copy * - * @psalm-param list $nodes + * @phpstan-param list $nodes * @return void * @throws \Neos\Flow\Property\Exception * @throws \Neos\Flow\Security\Exception @@ -553,7 +553,7 @@ public function clearClipboardAction() /** * Persists the clipboard node on cut * - * @psalm-param list $nodes + * @phpstan-param list $nodes * @throws \Neos\Flow\Property\Exception * @throws \Neos\Flow\Security\Exception */ @@ -591,7 +591,7 @@ public function initializeGetAdditionalNodeMetadataAction(): void /** * Fetches all the node information that can be lazy-loaded - * @psalm-param list $nodes + * @phpstan-param list $nodes */ public function getAdditionalNodeMetadataAction(array $nodes): void { @@ -639,7 +639,7 @@ public function initializeGetPolicyInformationAction(): void } /** - * @psalm-param list $nodes + * @phpstan-param list $nodes */ public function getPolicyInformationAction(array $nodes): void { @@ -672,7 +672,7 @@ public function getPolicyInformationAction(array $nodes): void /** * Build and execute a flow query chain * - * @psalm-param list}> $chain + * @phpstan-param non-empty-list}> $chain */ public function flowQueryAction(array $chain): string { diff --git a/Classes/Domain/Service/UserLocaleService.php b/Classes/Domain/Service/UserLocaleService.php index edea62a8aa..2caa5556be 100644 --- a/Classes/Domain/Service/UserLocaleService.php +++ b/Classes/Domain/Service/UserLocaleService.php @@ -44,7 +44,7 @@ class UserLocaleService /** * The current user's locale (cached for performance) * - * @var Locale + * @var Locale|null */ protected $userLocaleRuntimeCache; diff --git a/Classes/FlowQueryOperations/NeosUiDefaultNodesOperation.php b/Classes/FlowQueryOperations/NeosUiDefaultNodesOperation.php index 40d5b629c5..c941c8bef9 100644 --- a/Classes/FlowQueryOperations/NeosUiDefaultNodesOperation.php +++ b/Classes/FlowQueryOperations/NeosUiDefaultNodesOperation.php @@ -67,10 +67,13 @@ public function canEvaluate($context) */ public function evaluate(FlowQuery $flowQuery, array $arguments) { + /** @var array $context */ + $context = $flowQuery->getContext(); + /** @var Node $siteNode */ - $siteNode = $flowQuery->getContext()[0]; + $siteNode = $context[0]; /** @var Node $documentNode */ - $documentNode = $flowQuery->getContext()[1] ?? $siteNode; + $documentNode = $context[1] ?? $siteNode; /** @var string[] $toggledNodes */ list($baseNodeType, $loadingDepth, $toggledNodes, $clipboardNodesContextPaths) = $arguments;