Skip to content

Commit 095f5c0

Browse files
committed
this can be - null, Location, array, string and prolly int as well, good luck finding that out
1 parent 5622864 commit 095f5c0

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

phpstan-baseline.neon

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10392,6 +10392,11 @@ parameters:
1039210392
count: 1
1039310393
path: src/lib/Form/Type/UniversalDiscoveryWidget/UniversalDiscoveryWidgetType.php
1039410394

10395+
-
10396+
message: '#^Closure is missing a return type declaration$#'
10397+
count: 1
10398+
path: src/lib/Form/Type/UniversalDiscoveryWidget/UniversalDiscoveryWidgetType.php
10399+
1039510400
-
1039610401
message: '#^Method Ibexa\\AdminUi\\Form\\Type\\UniversalDiscoveryWidget\\UniversalDiscoveryWidgetType\:\:buildForm\(\) has no return type specified\.$#'
1039710402
identifier: missingType.return

src/lib/Form/Type/UniversalDiscoveryWidget/UniversalDiscoveryWidgetType.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
namespace Ibexa\AdminUi\Form\Type\UniversalDiscoveryWidget;
99

1010
use Ibexa\AdminUi\Form\Type\Content\LocationType;
11-
use Ibexa\Contracts\Core\Repository\Values\Content\Location;
1211
use Symfony\Component\Form\AbstractType;
1312
use Symfony\Component\Form\CallbackTransformer;
1413
use Symfony\Component\Form\DataTransformerInterface;
@@ -104,7 +103,7 @@ static function ($value): ?array {
104103

105104
return ['location' => !empty($ids) ? $ids : null];
106105
},
107-
static function ($value): ?Location {
106+
static function ($value) {
108107
if (is_array($value) && array_key_exists('location', $value)) {
109108
return $value['location'] ?? null;
110109
}

0 commit comments

Comments
 (0)