Skip to content

Commit

Permalink
Ran ECS
Browse files Browse the repository at this point in the history
  • Loading branch information
Sean Delaney committed Jun 30, 2022
1 parent e2a3c1f commit 01d1d23
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/Vocabulary.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,15 @@ public function init()
Event::on(
Fields::class,
Fields::EVENT_REGISTER_FIELD_TYPES,
function (RegisterComponentTypesEvent $event) {
function(RegisterComponentTypesEvent $event) {
$event->types[] = VocabularyField::class;
}
);

Event::on(
Plugins::class,
Plugins::EVENT_AFTER_ENABLE_PLUGIN,
function (PluginEvent $event) {
function(PluginEvent $event) {
if ($event->plugin === $this) {
// or run /actions/vocabulary/vocabulary/install-examples in your browser
Craft::$app->controllerNamespace = 'delaneymethod\\vocabulary\\controllers';
Expand Down
4 changes: 2 additions & 2 deletions src/controllers/VocabularyController.php
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ private function createExampleEntry(): bool
$newBlocks['blocks'] = [];

foreach ($glossaries as $key => $glossary) {
$newBlocks['blocks']['new:'.($key + 1)] = $glossary;
$newBlocks['blocks']['new:' . ($key + 1)] = $glossary;
}

$existingBlocks = $entry->getFieldValue('vocabulary')->ids();
Expand All @@ -358,6 +358,6 @@ private function createExampleEntry(): bool
*/
private function createExampleTemplates(): bool
{
return copy(Craft::$app->getPlugins()->getPlugin('vocabulary')->getBasePath().'/templates/glossary-example.twig', Craft::$app->getPath()->getSiteTemplatesPath().'/glossary-example.twig');
return copy(Craft::$app->getPlugins()->getPlugin('vocabulary')->getBasePath() . '/templates/glossary-example.twig', Craft::$app->getPath()->getSiteTemplatesPath() . '/glossary-example.twig');
}
}

0 comments on commit 01d1d23

Please sign in to comment.