diff --git a/src/Extensions/DefaultTermsDataExtension.php b/src/Extensions/DefaultTermsDataExtension.php index b16e7a9..c5f17f6 100644 --- a/src/Extensions/DefaultTermsDataExtension.php +++ b/src/Extensions/DefaultTermsDataExtension.php @@ -23,7 +23,6 @@ * ]; * * The terms are added by their full-path-like url slugs. - * */ class DefaultTermsDataExtension extends DataExtension { diff --git a/src/Models/ConceptClass.php b/src/Models/ConceptClass.php index f95615f..5bc15a1 100644 --- a/src/Models/ConceptClass.php +++ b/src/Models/ConceptClass.php @@ -156,7 +156,7 @@ public function canDelete($member = null): bool */ protected function getDefaultConceptClasses(): array { - return $this->config()->get('default_concept_classes') ? : []; + return $this->config()->get('default_concept_classes') ?: []; } diff --git a/src/Models/TaxonomyTerm.php b/src/Models/TaxonomyTerm.php index 67dec6d..99e0f70 100644 --- a/src/Models/TaxonomyTerm.php +++ b/src/Models/TaxonomyTerm.php @@ -63,14 +63,14 @@ class TaxonomyTerm extends BaseTerm ]; private static $has_many = [ - 'Children' => self::class . '.Parent', - 'Terms' => self::class . '.Type', + 'Children' => self::class . '.Parent', + 'Terms' => self::class . '.Type', // inverse relation of Tags to the ManyManyThrough joining object: DataObjectTaxonomyTerm 'DataObjectTaxonomyTerms' => DataObjectTaxonomyTerm::class, 'EquivalentAltTerms' => EquivalentTerm::class, 'LanguageAltTerms' => LanguageTerm::class, // inverse relation of AssociatedTerms to the ManyManyThrough joining object: AssociativeRelation - 'AssociativeRelations' => AssociativeRelation::class, + 'AssociativeRelations' => AssociativeRelation::class, ]; private static $has_one = [ @@ -499,7 +499,7 @@ public function getCMSFields() $associatedGridConfig->addComponent($editableColumns = new GridFieldEditableColumns()); $editableColumns->setDisplayFields( [ - 'ComponentAssociativeRelationTypeID' => [ + 'ComponentAssociativeRelationTypeID' => [ 'callback' => function ($record, $col, $grid) { return DropdownField::create( $col, @@ -507,7 +507,7 @@ public function getCMSFields() AssociativeRelationType::get()->map(), )->setEmptyString('--- select an associative type ---'); }, - 'title' => 'Associative type', + 'title' => 'Associative type', ], 'ComponentAssociativeIsInverseRelation' => [ 'callback' => function ($record, $col, $grid) { @@ -516,16 +516,17 @@ public function getCMSFields() 'Inverse relation (right to left)?', ); }, - 'title' => 'Inverse relation (right to left)?', + 'title' => 'Inverse relation (right to left)?', ], - 'getNameAsTag' => 'Associated taxonomy term', + 'getNameAsTag' => 'Associated taxonomy term', ] ); } else { $fields->removeFieldFromTab('Root.AssociatedTerms', 'AssociatedTerms'); $noTypesOfAssociationDefined = 'Please define at least one associative relation type first.'; - $fields->addFieldToTab('Root.AssociatedTerms', + $fields->addFieldToTab( + 'Root.AssociatedTerms', LiteralField::create( 'NoTypesOfAssociationDefined', '
' @@ -750,7 +751,7 @@ public function getTermHierarchy(string $separator = ' ▸ ', callable $termsDec return sprintf('%s', $term->Name); }; - $termsDecorator = $termsDecorator ? : $plaintextDecorator; + $termsDecorator = $termsDecorator ?: $plaintextDecorator; // hierarchy parts that will be joined together with the levels separator, decorated via a callback if defined $parts = array_map($termsDecorator, array_reverse($this->getAncestors()->toArray())); @@ -927,8 +928,8 @@ public function getAllRequiredTypesNames(string $delimiter = '