Skip to content

Commit f91ff62

Browse files
committed
Remove unnecessary not null check
1 parent 9044d7f commit f91ff62

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Bridge/Doctrine/Common/Filter/SearchFilterTrait.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,9 @@ abstract protected function getPropertyAccessor(): PropertyAccessorInterface;
116116
protected function getIdFromValue(string $value)
117117
{
118118
try {
119-
if (null !== $item = $this->getIriConverter()->getItemFromIri($value, ['fetch_data' => false])) {
120-
return $this->getPropertyAccessor()->getValue($item, 'id');
121-
}
119+
$item = $this->getIriConverter()->getItemFromIri($value, ['fetch_data' => false]);
120+
121+
return $this->getPropertyAccessor()->getValue($item, 'id');
122122
} catch (InvalidArgumentException $e) {
123123
// Do nothing, return the raw value
124124
}

0 commit comments

Comments
 (0)