diff --git a/src/Vocabulary.php b/src/Vocabulary.php index e9bb91f..a9af250 100644 --- a/src/Vocabulary.php +++ b/src/Vocabulary.php @@ -52,7 +52,7 @@ public function init() Event::on( Fields::class, Fields::EVENT_REGISTER_FIELD_TYPES, - function (RegisterComponentTypesEvent $event) { + function(RegisterComponentTypesEvent $event) { $event->types[] = VocabularyField::class; } ); @@ -60,7 +60,7 @@ function (RegisterComponentTypesEvent $event) { 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'; diff --git a/src/controllers/VocabularyController.php b/src/controllers/VocabularyController.php index e03503b..fa6aa78 100644 --- a/src/controllers/VocabularyController.php +++ b/src/controllers/VocabularyController.php @@ -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(); @@ -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'); } }