@@ -81,6 +81,8 @@ public static function getObjectFieldValue(object|array $object, string $field):
8181
8282 /**
8383 * Helper for sorting arrays of objects based on multiple fields + orientations.
84+ *
85+ * @return Closure(mixed, mixed): int
8486 */
8587 public static function sortByField (string $ name , int $ orientation = 1 , Closure |null $ next = null ): Closure
8688 {
@@ -171,7 +173,11 @@ public function walkCompositeExpression(CompositeExpression $expr): Closure
171173 };
172174 }
173175
174- /** @param callable[] $expressions */
176+ /**
177+ * @param callable[] $expressions
178+ *
179+ * @return Closure(object): bool
180+ */
175181 private function andExpressions (array $ expressions ): Closure
176182 {
177183 return static fn (object $ object ): bool => array_all (
@@ -180,7 +186,11 @@ private function andExpressions(array $expressions): Closure
180186 );
181187 }
182188
183- /** @param callable[] $expressions */
189+ /**
190+ * @param callable[] $expressions
191+ *
192+ * @return Closure(object): bool
193+ */
184194 private function orExpressions (array $ expressions ): Closure
185195 {
186196 return static fn (object $ object ): bool => array_any (
@@ -189,7 +199,11 @@ private function orExpressions(array $expressions): Closure
189199 );
190200 }
191201
192- /** @param callable[] $expressions */
202+ /**
203+ * @param callable[] $expressions
204+ *
205+ * @return Closure(object): bool
206+ */
193207 private function notExpression (array $ expressions ): Closure
194208 {
195209 return static fn (object $ object ) => ! $ expressions [0 ]($ object );
0 commit comments