From 1ae03135753a533474557500153a07cee0a6e1b1 Mon Sep 17 00:00:00 2001 From: Toby Zerner Date: Thu, 22 Jul 2021 12:33:40 +0930 Subject: [PATCH] Undo typehint --- src/Adapter/AdapterInterface.php | 7 ++++--- src/Adapter/EloquentAdapter.php | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/Adapter/AdapterInterface.php b/src/Adapter/AdapterInterface.php index 567c6a3..decdcde 100644 --- a/src/Adapter/AdapterInterface.php +++ b/src/Adapter/AdapterInterface.php @@ -227,11 +227,12 @@ interface AdapterInterface * * @param array $models * @param array $relationships - * @param Closure $scope Should be called to give the deepest relationship - * an opportunity to scope the query that will fetch related resources + * @param array|Closure $scope Should be called to give the deepest + * relationship an opportunity to scope the query that will fetch related + * resources * @param bool $linkage true if we just need the IDs of the related * resources and not their full data * @return mixed */ - public function load(array $models, array $relationships, Closure $scope, bool $linkage): void; + public function load(array $models, array $relationships, $scope, bool $linkage): void; } diff --git a/src/Adapter/EloquentAdapter.php b/src/Adapter/EloquentAdapter.php index 4973e9f..508dbdd 100644 --- a/src/Adapter/EloquentAdapter.php +++ b/src/Adapter/EloquentAdapter.php @@ -192,7 +192,7 @@ class EloquentAdapter implements AdapterInterface $query->take($limit)->skip($offset); } - public function load(array $models, array $relationships, Closure $scope, bool $linkage): void + public function load(array $models, array $relationships, $scope, bool $linkage): void { // TODO: Find the relation on the model that we're after. If it's a // belongs-to relation, and we only need linkage, then we won't need