Skip to content

Commit 30d565f

Browse files
authored
Merge pull request #2906 from teohhanhui/fix/workaround-phpstan-error
Use workaround for a phpstan error
2 parents 7397e0b + ebb4b0b commit 30d565f

File tree

3 files changed

+4
-7
lines changed

3 files changed

+4
-7
lines changed

phpstan.neon.dist

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,6 @@ parameters:
8484
message: '#Binary operation "\+" between (float\|int\|)?string and 0 results in an error\.#'
8585
path: %currentWorkingDirectory%/src/Bridge/Doctrine/Common/Filter/RangeFilterTrait.php
8686
- '#Parameter \#1 \$objectValue of method GraphQL\\Type\\Definition\\InterfaceType::resolveType\(\) expects object, array(<string, string>)? given.#'
87-
-
88-
message: '#Parameter \#1 $callback of function array_map expects (callable)|null, array<int, mixed> given\.#'
89-
path: %currentWorkingDirectory%/src/Bridge/Doctrine/*/Filter/AbstractFilter.php
9087

9188
# Expected, due to deprecations
9289
- '#Method ApiPlatform\\Core\\Bridge\\Doctrine\\Orm\\Extension\\QueryResult(Item|Collection)ExtensionInterface::getResult\(\) invoked with 4 parameters, 1 required\.#'

src/Bridge/Doctrine/MongoDbOdm/Filter/AbstractFilter.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ protected function isPropertyEnabled(string $property, string $resourceClass): b
9393

9494
protected function denormalizePropertyName($property)
9595
{
96-
if (null === $this->nameConverter) {
96+
if (!$this->nameConverter instanceof NameConverterInterface) {
9797
return $property;
9898
}
9999

@@ -102,7 +102,7 @@ protected function denormalizePropertyName($property)
102102

103103
protected function normalizePropertyName($property)
104104
{
105-
if (null === $this->nameConverter) {
105+
if (!$this->nameConverter instanceof NameConverterInterface) {
106106
return $property;
107107
}
108108

src/Bridge/Doctrine/Orm/Filter/AbstractFilter.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ protected function extractProperties(Request $request/*, string $resourceClass*/
144144

145145
protected function denormalizePropertyName($property)
146146
{
147-
if (null === $this->nameConverter) {
147+
if (!$this->nameConverter instanceof NameConverterInterface) {
148148
return $property;
149149
}
150150

@@ -153,7 +153,7 @@ protected function denormalizePropertyName($property)
153153

154154
protected function normalizePropertyName($property)
155155
{
156-
if (null === $this->nameConverter) {
156+
if (!$this->nameConverter instanceof NameConverterInterface) {
157157
return $property;
158158
}
159159

0 commit comments

Comments
 (0)