From feaf2cc442a5b3f0a6a5f1b33e205478983440ad Mon Sep 17 00:00:00 2001 From: Tom Broucke Date: Wed, 11 Dec 2024 10:11:33 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=A9=B9=20fix:=20change=20return=20type=20?= =?UTF-8?q?to=20mixed?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- phpstan.neon.dist | 1 - src/AcfObjects.php | 5 +---- src/Facades/AcfObjects.php | 4 +--- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/phpstan.neon.dist b/phpstan.neon.dist index f7ce13c..9dd9325 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -9,7 +9,6 @@ parameters: - vendor/php-stubs/acf-pro-stubs/acf-pro-stubs.php paths: - inc/ - checkGenericClassInNonGenericObjectType: false ignoreErrors: - '#Function view not found#' - '#Function app not found#' diff --git a/src/AcfObjects.php b/src/AcfObjects.php index 8527906..bb88256 100644 --- a/src/AcfObjects.php +++ b/src/AcfObjects.php @@ -2,9 +2,6 @@ namespace Otomaties\AcfObjects; -use Otomaties\AcfObjects\Contracts\CollectionContract; -use Otomaties\AcfObjects\Contracts\FieldContract; - class AcfObjects { /** @@ -14,7 +11,7 @@ class AcfObjects * @param $postId mixed the post_id of which the value is saved against * @param $formatValue boolean whether or not to format the value as described above */ - public function getField(string $selector, mixed $postId = false, bool $formatValue = true): FieldContract|CollectionContract|bool + public function getField(string $selector, mixed $postId = false, bool $formatValue = true): mixed { $postId = acf_get_valid_post_id($postId); $field = acf_maybe_get_field($selector, $postId); diff --git a/src/Facades/AcfObjects.php b/src/Facades/AcfObjects.php index e830689..75063de 100644 --- a/src/Facades/AcfObjects.php +++ b/src/Facades/AcfObjects.php @@ -3,11 +3,9 @@ namespace Otomaties\AcfObjects\Facades; use Illuminate\Support\Facades\Facade; -use Otomaties\AcfObjects\Contracts\CollectionContract; -use Otomaties\AcfObjects\Contracts\FieldContract; /** - * @method static FieldContract | CollectionContract | bool getField(string $selector, mixed $postId = false, bool $formatValue = true) + * @method static mixed getField(string $selector, mixed $postId = false, bool $formatValue = true) * * @see \Otomaties\AcfObjects\AcfObjects */