Skip to content

Commit eabfdac

Browse files
chore(style): Fix code style
1 parent 8257ca4 commit eabfdac

File tree

2 files changed

+51
-51
lines changed

2 files changed

+51
-51
lines changed

src/ThemeInstaller.php

Lines changed: 43 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -7,51 +7,51 @@
77

88
class ThemeInstaller extends LibraryInstaller
99
{
10-
/**
11-
* {@inheritdoc}
12-
*/
13-
public function supports($packageType)
14-
{
15-
return $packageType === 'laravel-theme';
16-
}
10+
/**
11+
* {@inheritdoc}
12+
*/
13+
public function supports($packageType)
14+
{
15+
return $packageType === 'laravel-theme';
16+
}
1717

18-
/**
19-
* {@inheritdoc}
20-
*/
21-
public function getInstallPath(PackageInterface $package)
22-
{
23-
return $this->getBaseInstallationPath() . DIRECTORY_SEPARATOR . $this->getThemeName($package);
24-
}
18+
/**
19+
* {@inheritdoc}
20+
*/
21+
public function getInstallPath(PackageInterface $package)
22+
{
23+
return $this->getBaseInstallationPath() . DIRECTORY_SEPARATOR . $this->getThemeName($package);
24+
}
2525

26-
/**
27-
* Get the base path that the module should be installed into.
28-
* Defaults to Modules/ and can be overridden in the module's composer.json.
29-
* @return string
30-
*/
31-
protected function getBaseInstallationPath()
32-
{
33-
if ($this->composer && $this->composer->getPackage()) {
34-
$extra = $this->composer->getPackage()->getExtra();
26+
/**
27+
* Get the base path that the module should be installed into.
28+
* Defaults to Modules/ and can be overridden in the module's composer.json.
29+
* @return string
30+
*/
31+
protected function getBaseInstallationPath()
32+
{
33+
if ($this->composer && $this->composer->getPackage()) {
34+
$extra = $this->composer->getPackage()->getExtra();
3535

36-
if (array_key_exists('theme-dir', $extra)) {
37-
return $extra['theme-dir'];
38-
}
39-
}
36+
if (array_key_exists('theme-dir', $extra)) {
37+
return $extra['theme-dir'];
38+
}
39+
}
4040

41-
return 'themes';
42-
}
43-
44-
/**
45-
* Get the theme name
46-
* "something" => "something"
47-
* "vendor-name/something" => "something"
48-
* "vendor-name/something-theme" => "something"
49-
* @param PackageInterface $package
50-
* @return string
51-
* @throws \Exception
52-
*/
53-
protected function getThemeName(PackageInterface $package)
54-
{
55-
return str_replace('-theme', '', str_replace('theme-', '', $package->getPrettyName()));
56-
}
41+
return 'themes';
42+
}
43+
44+
/**
45+
* Get the theme name
46+
* "something" => "something"
47+
* "vendor-name/something" => "something"
48+
* "vendor-name/something-theme" => "something"
49+
* @param PackageInterface $package
50+
* @return string
51+
* @throws \Exception
52+
*/
53+
protected function getThemeName(PackageInterface $package)
54+
{
55+
return str_replace('-theme', '', str_replace('theme-', '', $package->getPrettyName()));
56+
}
5757
}

src/ThemeInstallerPlugin.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@
88

99
class ThemeInstallerPlugin implements PluginInterface
1010
{
11-
/**
12-
* {@inheritdoc}
13-
*/
14-
public function activate(Composer $composer, IOInterface $io)
15-
{
16-
$installer = new ThemeInstaller($io, $composer);
11+
/**
12+
* {@inheritdoc}
13+
*/
14+
public function activate(Composer $composer, IOInterface $io)
15+
{
16+
$installer = new ThemeInstaller($io, $composer);
1717

18-
$composer->getInstallationManager()->addInstaller($installer);
19-
}
18+
$composer->getInstallationManager()->addInstaller($installer);
19+
}
2020
}

0 commit comments

Comments
 (0)