File tree Expand file tree Collapse file tree 2 files changed +6
-8
lines changed
Classes/Projection/ContentGraph Expand file tree Collapse file tree 2 files changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -46,8 +46,9 @@ public function getSubgraph(
46
46
): ContentSubgraphInterface ;
47
47
48
48
/**
49
- * @deprecated please use {@see findRootNodeAggregates} instead
50
- * @internal
49
+ * @api
50
+ * Throws exception if no root aggregate found, because a Content Repository needs at least
51
+ * one root node to function.
51
52
*/
52
53
public function findRootNodeAggregateByType (
53
54
ContentStreamId $ contentStreamId ,
Original file line number Diff line number Diff line change @@ -74,17 +74,14 @@ public function count(): int
74
74
}
75
75
76
76
/**
77
- * Throws exception if no root aggregate found, because a Content Repository needs at least
78
- * one root node to function.
79
- *
80
- * @return NodeAggregate
77
+ * @return NodeAggregate|null
81
78
*/
82
- public function first (): NodeAggregate
79
+ public function first (): ? NodeAggregate
83
80
{
84
81
if (count ($ this ->nodeAggregates ) > 0 ) {
85
82
$ array = $ this ->nodeAggregates ;
86
83
return reset ($ array );
87
84
}
88
- throw new \ RuntimeException ( ' Root Node Aggregate not found ' ) ;
85
+ return null ;
89
86
}
90
87
}
You can’t perform that action at this time.
0 commit comments