Skip to content

Commit

Permalink
🩹 fix: change return type to mixed
Browse files Browse the repository at this point in the history
  • Loading branch information
tombroucke committed Dec 11, 2024
1 parent 19a6146 commit feaf2cc
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 8 deletions.
1 change: 0 additions & 1 deletion phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -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#'
Expand Down
5 changes: 1 addition & 4 deletions src/AcfObjects.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@

namespace Otomaties\AcfObjects;

use Otomaties\AcfObjects\Contracts\CollectionContract;
use Otomaties\AcfObjects\Contracts\FieldContract;

class AcfObjects
{
/**
Expand All @@ -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);
Expand Down
4 changes: 1 addition & 3 deletions src/Facades/AcfObjects.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down

0 comments on commit feaf2cc

Please sign in to comment.