From eabfdac7536ca215b11d9042acc306be9f49eb49 Mon Sep 17 00:00:00 2001 From: Gaetan Date: Sat, 24 Oct 2020 20:45:52 +0200 Subject: [PATCH] chore(style): Fix code style --- src/ThemeInstaller.php | 86 ++++++++++++++++++------------------ src/ThemeInstallerPlugin.php | 16 +++---- 2 files changed, 51 insertions(+), 51 deletions(-) diff --git a/src/ThemeInstaller.php b/src/ThemeInstaller.php index fe9fc35..fa4ff30 100644 --- a/src/ThemeInstaller.php +++ b/src/ThemeInstaller.php @@ -7,51 +7,51 @@ class ThemeInstaller extends LibraryInstaller { - /** - * {@inheritdoc} - */ - public function supports($packageType) - { - return $packageType === 'laravel-theme'; - } + /** + * {@inheritdoc} + */ + public function supports($packageType) + { + return $packageType === 'laravel-theme'; + } - /** - * {@inheritdoc} - */ - public function getInstallPath(PackageInterface $package) - { - return $this->getBaseInstallationPath() . DIRECTORY_SEPARATOR . $this->getThemeName($package); - } + /** + * {@inheritdoc} + */ + public function getInstallPath(PackageInterface $package) + { + return $this->getBaseInstallationPath() . DIRECTORY_SEPARATOR . $this->getThemeName($package); + } - /** - * Get the base path that the module should be installed into. - * Defaults to Modules/ and can be overridden in the module's composer.json. - * @return string - */ - protected function getBaseInstallationPath() - { - if ($this->composer && $this->composer->getPackage()) { - $extra = $this->composer->getPackage()->getExtra(); + /** + * Get the base path that the module should be installed into. + * Defaults to Modules/ and can be overridden in the module's composer.json. + * @return string + */ + protected function getBaseInstallationPath() + { + if ($this->composer && $this->composer->getPackage()) { + $extra = $this->composer->getPackage()->getExtra(); - if (array_key_exists('theme-dir', $extra)) { - return $extra['theme-dir']; - } - } + if (array_key_exists('theme-dir', $extra)) { + return $extra['theme-dir']; + } + } - return 'themes'; - } - - /** - * Get the theme name - * "something" => "something" - * "vendor-name/something" => "something" - * "vendor-name/something-theme" => "something" - * @param PackageInterface $package - * @return string - * @throws \Exception - */ - protected function getThemeName(PackageInterface $package) - { - return str_replace('-theme', '', str_replace('theme-', '', $package->getPrettyName())); - } + return 'themes'; + } + + /** + * Get the theme name + * "something" => "something" + * "vendor-name/something" => "something" + * "vendor-name/something-theme" => "something" + * @param PackageInterface $package + * @return string + * @throws \Exception + */ + protected function getThemeName(PackageInterface $package) + { + return str_replace('-theme', '', str_replace('theme-', '', $package->getPrettyName())); + } } diff --git a/src/ThemeInstallerPlugin.php b/src/ThemeInstallerPlugin.php index ebdeb17..8993f8f 100644 --- a/src/ThemeInstallerPlugin.php +++ b/src/ThemeInstallerPlugin.php @@ -8,13 +8,13 @@ class ThemeInstallerPlugin implements PluginInterface { - /** - * {@inheritdoc} - */ - public function activate(Composer $composer, IOInterface $io) - { - $installer = new ThemeInstaller($io, $composer); + /** + * {@inheritdoc} + */ + public function activate(Composer $composer, IOInterface $io) + { + $installer = new ThemeInstaller($io, $composer); - $composer->getInstallationManager()->addInstaller($installer); - } + $composer->getInstallationManager()->addInstaller($installer); + } }