Skip to content

Commit

Permalink
Fix phpstan issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Randy Čupić committed Sep 24, 2024
1 parent 8728095 commit 4e1d2ae
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/FieldType/SearchFields.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
use Ibexa\Contracts\Core\Search\FieldType\IntegerField;
use Ibexa\Contracts\Core\Search\FieldType\MultipleStringField;
use Ibexa\Contracts\Core\Search\FieldType\StringField;
use Ibexa\Core\FieldType\FieldType;
use Ibexa\Contracts\Core\Search\FieldType;
use Netgen\RemoteMedia\API\ProviderInterface;
use Netgen\RemoteMedia\API\Values\Folder;
use Netgen\RemoteMedia\API\Values\RemoteResource;
Expand Down Expand Up @@ -117,7 +117,7 @@ public function getIndexData(Field $field, FieldDefinition $fieldDefinition): ar
new Search\Field(
'tags',
array_map(
fn (string $tag): string => $this->prepareStringValue($tag),
fn (string $tag): string => (string) $this->prepareStringValue($tag),
$resource instanceof RemoteResource ? $resource->getTags() : [],
),
new MultipleStringField(),
Expand Down
2 changes: 1 addition & 1 deletion lib/FieldType/Value.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function __toString(): string
public function getName(): string
{
return $this->remoteResourceLocation instanceof RemoteResourceLocation
? $this->remoteResourceLocation->getRemoteResource()->getName()
? ($this->remoteResourceLocation->getRemoteResource()->getName() ?? $this->remoteResourceLocation->getRemoteResource()->getRemoteId())
: '';
}
}

0 comments on commit 4e1d2ae

Please sign in to comment.