Skip to content

Commit

Permalink
Merge pull request #24 from chrometoasters/minor/clean-codebase
Browse files Browse the repository at this point in the history
Clean codebase
  • Loading branch information
normann authored May 5, 2020
2 parents fd1dd87 + 877a72a commit 5a24e84
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 18 deletions.
9 changes: 1 addition & 8 deletions src/Extensions/DataObjectTaxonomiesDataExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,11 @@
use Chrometoaster\AdvancedTaxonomies\Validators\TaxonomyRulesValidator;
use SilverStripe\Forms\FieldList;
use SilverStripe\Forms\GridField\GridField;
use SilverStripe\Forms\GridField\GridFieldAddExistingAutocompleter;
use SilverStripe\Forms\GridField\GridFieldAddNewButton;
use SilverStripe\Forms\GridField\GridFieldConfig_RelationEditor;
use SilverStripe\Forms\GridField\GridFieldDataColumns;
use SilverStripe\Forms\GridField\GridFieldEditButton;
use SilverStripe\Forms\GridField\GridFieldFilterHeader;
use SilverStripe\Forms\LiteralField;
use SilverStripe\ORM\DataExtension;
use SilverStripe\ORM\DataList;
use SilverStripe\ORM\FieldType\DBField;
use SilverStripe\ORM\FieldType\DBHTMLText;
use SilverStripe\Versioned\GridFieldArchiveAction;

/**
* Class DataObjectTaxonomiesDataExtension
Expand Down Expand Up @@ -70,7 +63,7 @@ public function updateCMSFields(FieldList $fields)

$gridFieldConfig = FieldsProvider::getTaggingGridFieldConfig(
$searchList,
['getAllRequiredTypesNames' => 'Requires']
['getAllRequiredTypesNames' => 'Requires']
);

$fields->findOrMakeTab('Root.Tags', _t(self::class . '.TagsTabTitle', 'Tags'));
Expand Down
3 changes: 0 additions & 3 deletions src/Extensions/FileFormFactoryTaxonomyExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,6 @@ public function updateFormFields(FieldList $fields, $controller, $formName, $con
$record = $context['Record'];

if (!is_a($record, Folder::class)) {
if ($formName === 'fileEditForm') {
}

$tags = TreeMultiselectField::create(
'Tags',
_t(self::class . '.Tags', 'Tags'),
Expand Down
3 changes: 0 additions & 3 deletions src/Forms/FieldsProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
namespace Chrometoaster\AdvancedTaxonomies\Forms;

use Chrometoaster\AdvancedTaxonomies\Models\TaxonomyTerm;
use Chrometoaster\AdvancedTaxonomies\Forms\GridFieldAddTagsAutocompleter;
use Chrometoaster\AdvancedTaxonomies\Forms\GridFieldInfoLink;
use Chrometoaster\AdvancedTaxonomies\Forms\GridFieldOrderableRows;
use SilverStripe\Forms\GridField\GridFieldAddExistingAutocompleter;
use SilverStripe\Forms\GridField\GridFieldAddNewButton;
use SilverStripe\Forms\GridField\GridFieldConfig;
Expand Down
2 changes: 1 addition & 1 deletion src/Models/TaxonomyTerm.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@
use SilverStripe\Security\Permission;
use SilverStripe\Security\PermissionProvider;
use SilverStripe\Versioned\GridFieldArchiveAction;
use SilverStripe\View\ViewableData;
use SilverStripe\View\ArrayData;
use SilverStripe\View\ViewableData;
use UndefinedOffset\SortableGridField\Forms\GridFieldSortableRows;

/**
Expand Down
1 change: 0 additions & 1 deletion src/Tasks/RemoveOrphanedTagRelationObjectsTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
use SilverStripe\Control\HTTPRequest;
use SilverStripe\Core\ClassInfo;
use SilverStripe\Dev\BuildTask;
use SilverStripe\Dev\Deprecation;
use SilverStripe\ORM\DataObject;
use SilverStripe\ORM\DataObjectSchema;
use SilverStripe\ORM\DB;
Expand Down
2 changes: 0 additions & 2 deletions tests/TaxonomyTermTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
use Chrometoaster\AdvancedTaxonomies\Tests\Models\OwnerObject;
use Chrometoaster\AdvancedTaxonomies\Validators\TaxonomyRulesValidator;
use SilverStripe\Dev\SapphireTest;
use SilverStripe\ORM\ManyManyThroughList;
use SilverStripe\ORM\ValidationException;
use SilverStripe\Versioned\Versioned;

Expand Down Expand Up @@ -587,5 +586,4 @@ public function testTaggedObjectsCollectionMechanism()
'tagForTaggedObjects should show one tagged objects after a tag removal'
);
}

}

0 comments on commit 5a24e84

Please sign in to comment.