Skip to content

Commit 43ac1e2

Browse files
committed
Fixed type issues that Psalm tool reported
1 parent 4a2381e commit 43ac1e2

File tree

4 files changed

+6
-7
lines changed

4 files changed

+6
-7
lines changed

tests/Integration/Entity/LogLoginFailureTest.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,7 @@ public function testThatGetterReturnsExpectedValue(
8282

8383
$logRequest = new LogLoginFailure(new User());
8484

85-
if ($meta !== null
86-
&& method_exists($meta, 'isManyToManyOwningSide')
85+
if ($meta instanceof AssociationMapping
8786
&& (
8887
$meta->isManyToManyOwningSide()
8988
|| $meta->isOneToMany()

tests/Integration/Entity/LogLoginTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public function testThatGetterReturnsExpectedValue(
9898
new User(),
9999
);
100100

101-
if (method_exists($meta, 'isManyToManyOwningSide')
101+
if ($meta instanceof AssociationMapping
102102
&& (
103103
$meta->isManyToManyOwningSide()
104104
|| $meta->isOneToMany()

tests/Integration/Entity/LogRequestTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ public function testThatGetterReturnsExpectedValue(
100100

101101
$value = $logRequest->{$getter}();
102102

103-
if (method_exists($meta, 'isManyToManyOwningSide')
103+
if ($meta instanceof AssociationMapping
104104
&& (
105105
$meta->isManyToManyOwningSide()
106106
|| $meta->isOneToMany()

tests/Integration/TestCase/EntityTestCase.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ public function testThatSetterOnlyAcceptSpecifiedType(
141141
string $type,
142142
FieldMapping|AssociationMapping $meta,
143143
): void {
144-
if (method_exists($meta, 'isManyToManyOwningSide')
144+
if ($meta instanceof AssociationMapping
145145
&& (
146146
$meta->isManyToManyOwningSide()
147147
|| $meta->isOneToMany()
@@ -178,7 +178,7 @@ public function testThatSetterReturnsInstanceOfEntity(
178178
string $type,
179179
FieldMapping|AssociationMapping $meta,
180180
): void {
181-
if (method_exists($meta, 'isManyToManyOwningSide')
181+
if ($meta instanceof AssociationMapping
182182
&& (
183183
$meta->isManyToManyOwningSide()
184184
|| $meta->isOneToMany()
@@ -227,7 +227,7 @@ public function testThatGetterReturnsExpectedValue(
227227
/** @var callable $callable */
228228
$callable = [$entity, $getter];
229229

230-
if (method_exists($meta, 'isManyToManyOwningSide')
230+
if ($meta instanceof AssociationMapping
231231
&& (
232232
$meta->isManyToManyOwningSide()
233233
|| $meta->isOneToMany()

0 commit comments

Comments
 (0)