Skip to content

Commit

Permalink
[rector] Rector fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
lee-to authored and github-actions[bot] committed Jun 28, 2024
1 parent bb5fd61 commit 856d837
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/Laravel/Fields/Relationships/BelongsToMany.php
Original file line number Diff line number Diff line change
Expand Up @@ -213,13 +213,11 @@ public function getPreparedFields(): FieldsCollection
{
return $this->getFields()->prepareAttributes()->prepareReindex(
parent: $this,
before: function (self $parent, Field $field): FormElement {
return (clone $field)
->setColumn("{$this->getPivotAs()}.{$field->getColumn()}")
->setNameAttribute($field->getColumn())
->setAttribute('class', 'pivotField')
->withoutWrapper();
},
before: fn(self $parent, Field $field): FormElement => (clone $field)
->setColumn("{$this->getPivotAs()}.{$field->getColumn()}")
->setNameAttribute($field->getColumn())
->setAttribute('class', 'pivotField')
->withoutWrapper(),
performName: fn (string $name): string => str_replace("{$this->getPivotAs()}.", '', $name)
);
}
Expand Down

0 comments on commit 856d837

Please sign in to comment.