diff --git a/Neos.ContentRepository.Core/Classes/Projection/ContentGraph/Filter/FindBackReferencesFilter.php b/Neos.ContentRepository.Core/Classes/Projection/ContentGraph/Filter/FindBackReferencesFilter.php index 1f06f858e61..7e5ecb5e744 100644 --- a/Neos.ContentRepository.Core/Classes/Projection/ContentGraph/Filter/FindBackReferencesFilter.php +++ b/Neos.ContentRepository.Core/Classes/Projection/ContentGraph/Filter/FindBackReferencesFilter.php @@ -30,7 +30,7 @@ public static function create(): self return new self(null); } - public static function referenceName(ReferenceName|string $referenceName): self + public static function referenceName(ReferenceName $referenceName): self { return self::create()->with(referenceName: $referenceName); } @@ -42,11 +42,8 @@ public static function referenceName(ReferenceName|string $referenceName): self * @see https://www.php.net/manual/en/functions.arguments.php#functions.named-arguments */ public function with( - ReferenceName|string $referenceName = null, + ReferenceName $referenceName = null, ): self { - if (is_string($referenceName)) { - $referenceName = ReferenceName::fromString($referenceName); - } return new self( $referenceName ?? $this->referenceName, ); diff --git a/Neos.ContentRepository.Core/Classes/Projection/ContentGraph/Filter/FindChildNodesFilter.php b/Neos.ContentRepository.Core/Classes/Projection/ContentGraph/Filter/FindChildNodesFilter.php index 8b808e8f370..f62a0a4c9ca 100644 --- a/Neos.ContentRepository.Core/Classes/Projection/ContentGraph/Filter/FindChildNodesFilter.php +++ b/Neos.ContentRepository.Core/Classes/Projection/ContentGraph/Filter/FindChildNodesFilter.php @@ -32,7 +32,7 @@ public static function create(): self return new self(null, null, null); } - public static function nodeTypeConstraints(NodeTypeConstraints|string $nodeTypeConstraints): self + public static function nodeTypeConstraints(NodeTypeConstraints $nodeTypeConstraints): self { return self::create()->withNodeTypeConstraints($nodeTypeConstraints); } @@ -44,13 +44,10 @@ public static function nodeTypeConstraints(NodeTypeConstraints|string $nodeTypeC * @see https://www.php.net/manual/en/functions.arguments.php#functions.named-arguments */ public function with( - NodeTypeConstraints|string $nodeTypeConstraints = null, + NodeTypeConstraints $nodeTypeConstraints = null, int $limit = null, int $offset = null ): self { - if (is_string($nodeTypeConstraints)) { - $nodeTypeConstraints = NodeTypeConstraints::fromFilterString($nodeTypeConstraints); - } return new self( $nodeTypeConstraints ?? $this->nodeTypeConstraints, $limit ?? $this->limit, @@ -58,7 +55,7 @@ public function with( ); } - public function withNodeTypeConstraints(NodeTypeConstraints|string $nodeTypeConstraints): self + public function withNodeTypeConstraints(NodeTypeConstraints $nodeTypeConstraints): self { return $this->with(nodeTypeConstraints: $nodeTypeConstraints); } diff --git a/Neos.ContentRepository.Core/Classes/Projection/ContentGraph/Filter/FindDescendantNodesFilter.php b/Neos.ContentRepository.Core/Classes/Projection/ContentGraph/Filter/FindDescendantNodesFilter.php index 86a3d7716da..280b512f283 100644 --- a/Neos.ContentRepository.Core/Classes/Projection/ContentGraph/Filter/FindDescendantNodesFilter.php +++ b/Neos.ContentRepository.Core/Classes/Projection/ContentGraph/Filter/FindDescendantNodesFilter.php @@ -32,7 +32,7 @@ public static function create(): self return new self(null, null); } - public static function nodeTypeConstraints(NodeTypeConstraints|string $nodeTypeConstraints): self + public static function nodeTypeConstraints(NodeTypeConstraints $nodeTypeConstraints): self { return self::create()->with(nodeTypeConstraints: $nodeTypeConstraints); } @@ -44,22 +44,16 @@ public static function nodeTypeConstraints(NodeTypeConstraints|string $nodeTypeC * @see https://www.php.net/manual/en/functions.arguments.php#functions.named-arguments */ public function with( - NodeTypeConstraints|string $nodeTypeConstraints = null, - SearchTerm|string $searchTerm = null, + NodeTypeConstraints $nodeTypeConstraints = null, + SearchTerm $searchTerm = null, ): self { - if (is_string($nodeTypeConstraints)) { - $nodeTypeConstraints = NodeTypeConstraints::fromFilterString($nodeTypeConstraints); - } - if (is_string($searchTerm)) { - $searchTerm = SearchTerm::fulltext($searchTerm); - } return new self( $nodeTypeConstraints ?? $this->nodeTypeConstraints, $searchTerm ?? $this->searchTerm, ); } - public function withSearchTerm(SearchTerm|string $searchTerm): self + public function withSearchTerm(SearchTerm $searchTerm): self { return $this->with(searchTerm: $searchTerm); } diff --git a/Neos.ContentRepository.Core/Classes/Projection/ContentGraph/Filter/FindPrecedingSiblingNodesFilter.php b/Neos.ContentRepository.Core/Classes/Projection/ContentGraph/Filter/FindPrecedingSiblingNodesFilter.php index f3e6f096a37..a07b353d77d 100644 --- a/Neos.ContentRepository.Core/Classes/Projection/ContentGraph/Filter/FindPrecedingSiblingNodesFilter.php +++ b/Neos.ContentRepository.Core/Classes/Projection/ContentGraph/Filter/FindPrecedingSiblingNodesFilter.php @@ -32,7 +32,7 @@ public static function create(): self return new self(null, null, null); } - public static function nodeTypeConstraints(NodeTypeConstraints|string $nodeTypeConstraints): self + public static function nodeTypeConstraints(NodeTypeConstraints $nodeTypeConstraints): self { return self::create()->with(nodeTypeConstraints: $nodeTypeConstraints); } @@ -44,13 +44,10 @@ public static function nodeTypeConstraints(NodeTypeConstraints|string $nodeTypeC * @see https://www.php.net/manual/en/functions.arguments.php#functions.named-arguments */ public function with( - NodeTypeConstraints|string $nodeTypeConstraints = null, + NodeTypeConstraints $nodeTypeConstraints = null, int $limit = null, int $offset = null, ): self { - if (is_string($nodeTypeConstraints)) { - $nodeTypeConstraints = NodeTypeConstraints::fromFilterString($nodeTypeConstraints); - } return new self( $nodeTypeConstraints ?? $this->nodeTypeConstraints, $limit ?? $this->limit, diff --git a/Neos.ContentRepository.Core/Classes/Projection/ContentGraph/Filter/FindReferencesFilter.php b/Neos.ContentRepository.Core/Classes/Projection/ContentGraph/Filter/FindReferencesFilter.php index 8a95c2d54fc..fefbef3716e 100644 --- a/Neos.ContentRepository.Core/Classes/Projection/ContentGraph/Filter/FindReferencesFilter.php +++ b/Neos.ContentRepository.Core/Classes/Projection/ContentGraph/Filter/FindReferencesFilter.php @@ -31,7 +31,7 @@ public static function create(): self return new self(null); } - public static function referenceName(ReferenceName|string $referenceName): self + public static function referenceName(ReferenceName $referenceName): self { return self::create()->with(referenceName: $referenceName); } @@ -43,11 +43,8 @@ public static function referenceName(ReferenceName|string $referenceName): self * @see https://www.php.net/manual/en/functions.arguments.php#functions.named-arguments */ public function with( - ReferenceName|string $referenceName = null, + ReferenceName $referenceName = null, ): self { - if (is_string($referenceName)) { - $referenceName = ReferenceName::fromString($referenceName); - } return new self( $referenceName ?? $this->referenceName, ); diff --git a/Neos.ContentRepository.Core/Classes/Projection/ContentGraph/Filter/FindSubtreeFilter.php b/Neos.ContentRepository.Core/Classes/Projection/ContentGraph/Filter/FindSubtreeFilter.php index 3b34fc86a90..f6494c645da 100644 --- a/Neos.ContentRepository.Core/Classes/Projection/ContentGraph/Filter/FindSubtreeFilter.php +++ b/Neos.ContentRepository.Core/Classes/Projection/ContentGraph/Filter/FindSubtreeFilter.php @@ -31,7 +31,7 @@ public static function create(): self return new self(null, null); } - public static function nodeTypeConstraints(NodeTypeConstraints|string $nodeTypeConstraints): self + public static function nodeTypeConstraints(NodeTypeConstraints $nodeTypeConstraints): self { return self::create()->with(nodeTypeConstraints: $nodeTypeConstraints); } @@ -43,12 +43,9 @@ public static function nodeTypeConstraints(NodeTypeConstraints|string $nodeTypeC * @see https://www.php.net/manual/en/functions.arguments.php#functions.named-arguments */ public function with( - NodeTypeConstraints|string $nodeTypeConstraints = null, + NodeTypeConstraints $nodeTypeConstraints = null, int $maximumLevels = null, ): self { - if (is_string($nodeTypeConstraints)) { - $nodeTypeConstraints = NodeTypeConstraints::fromFilterString($nodeTypeConstraints); - } return new self( $nodeTypeConstraints ?? $this->nodeTypeConstraints, $maximumLevels ?? $this->maximumLevels, diff --git a/Neos.ContentRepository.Core/Classes/Projection/ContentGraph/Filter/FindSucceedingSiblingNodesFilter.php b/Neos.ContentRepository.Core/Classes/Projection/ContentGraph/Filter/FindSucceedingSiblingNodesFilter.php index 936995272c6..517354bc27c 100644 --- a/Neos.ContentRepository.Core/Classes/Projection/ContentGraph/Filter/FindSucceedingSiblingNodesFilter.php +++ b/Neos.ContentRepository.Core/Classes/Projection/ContentGraph/Filter/FindSucceedingSiblingNodesFilter.php @@ -32,7 +32,7 @@ public static function create(): self return new self(null, null, null); } - public static function nodeTypeConstraints(NodeTypeConstraints|string $nodeTypeConstraints): self + public static function nodeTypeConstraints(NodeTypeConstraints $nodeTypeConstraints): self { return self::create()->with(nodeTypeConstraints: $nodeTypeConstraints); } @@ -44,13 +44,10 @@ public static function nodeTypeConstraints(NodeTypeConstraints|string $nodeTypeC * @see https://www.php.net/manual/en/functions.arguments.php#functions.named-arguments */ public function with( - NodeTypeConstraints|string $nodeTypeConstraints = null, + NodeTypeConstraints $nodeTypeConstraints = null, int $limit = null, int $offset = null, ): self { - if (is_string($nodeTypeConstraints)) { - $nodeTypeConstraints = NodeTypeConstraints::fromFilterString($nodeTypeConstraints); - } return new self( $nodeTypeConstraints ?? $this->nodeTypeConstraints, $limit ?? $this->limit,