From 37f39268df9ca7aeadfa85aa43a92d282c5ba03c Mon Sep 17 00:00:00 2001 From: lee-to Date: Fri, 22 Sep 2023 13:55:08 +0000 Subject: [PATCH] [rector] Rector fixes --- src/Fields/Relationships/MorphTo.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Fields/Relationships/MorphTo.php b/src/Fields/Relationships/MorphTo.php index 14530fd73..180b3860e 100644 --- a/src/Fields/Relationships/MorphTo.php +++ b/src/Fields/Relationships/MorphTo.php @@ -81,7 +81,7 @@ public function requestTypeValue(): string public function getTypes(): array { - if(empty($this->types)) { + if($this->types === []) { throw new FieldException('Morph types is required'); } @@ -108,7 +108,7 @@ public function values(): array if(is_null($this->formattedValueCallback())) { $this->setFormattedValueCallback( - fn($v) => $v->{$this->getSearchColumn(get_class($v))} + fn($v) => $v->{$this->getSearchColumn($v::class)} ); } @@ -132,7 +132,7 @@ protected function resolvePreview(): string ->append( $item ->{$this->getRelationName()} - ->{$this->getSearchColumn(get_class($item->{$this->getRelationName()}))} + ->{$this->getSearchColumn($item->{$this->getRelationName()}::class)} ) ->append(')') ->value();