Skip to content

Commit a762400

Browse files
committed
Add override method attribute
1 parent aa7ed43 commit a762400

5 files changed

Lines changed: 16 additions & 0 deletions

File tree

phpstan.neon.dist

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ includes:
33

44
parameters:
55
level: 4
6+
checkMissingOverrideMethodAttribute: true
67
paths:
78
- .
89
excludePaths:

src/ExtensionInstaller.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ protected function getRoundcubemailInstallPath(): string
6767
return $this->roundcubemailInstallPath;
6868
}
6969

70+
#[\Override]
7071
public function getInstallPath(PackageInterface $package)
7172
{
7273
if (!$this->supports($package->getType())) {
@@ -87,13 +88,15 @@ private function initializeRoundcubemailEnvironment(): void
8788
require_once INSTALL_PATH . 'program/include/iniset.php';
8889
}
8990

91+
#[\Override]
9092
public function isInstalled(InstalledRepositoryInterface $repo, PackageInterface $package)
9193
{
9294
$this->setRoundcubemailInstallPath($repo);
9395

9496
return parent::isInstalled($repo, $package);
9597
}
9698

99+
#[\Override]
97100
public function install(InstalledRepositoryInterface $repo, PackageInterface $package)
98101
{
99102
$this->setRoundcubemailInstallPath($repo);
@@ -155,6 +158,7 @@ public function install(InstalledRepositoryInterface $repo, PackageInterface $pa
155158
return null;
156159
}
157160

161+
#[\Override]
158162
public function update(InstalledRepositoryInterface $repo, PackageInterface $initial, PackageInterface $target)
159163
{
160164
$this->setRoundcubemailInstallPath($repo);
@@ -220,6 +224,7 @@ public function update(InstalledRepositoryInterface $repo, PackageInterface $ini
220224
return null;
221225
}
222226

227+
#[\Override]
223228
public function uninstall(InstalledRepositoryInterface $repo, PackageInterface $package)
224229
{
225230
$this->setRoundcubemailInstallPath($repo);
@@ -261,6 +266,7 @@ public function uninstall(InstalledRepositoryInterface $repo, PackageInterface $
261266
return null;
262267
}
263268

269+
#[\Override]
264270
public function supports($packageType)
265271
{
266272
return $packageType === $this->composer_type;

src/PluginInstaller.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,13 @@ class PluginInstaller extends ExtensionInstaller
66
{
77
protected $composer_type = 'roundcube-plugin';
88

9+
#[\Override]
910
public function getVendorDir()
1011
{
1112
return $this->getRoundcubemailInstallPath() . \DIRECTORY_SEPARATOR . 'plugins';
1213
}
1314

15+
#[\Override]
1416
protected function confirmInstall($package_name)
1517
{
1618
$config = $this->composer->getConfig()->get('roundcube');
@@ -24,6 +26,7 @@ protected function confirmInstall($package_name)
2426
return $answer;
2527
}
2628

29+
#[\Override]
2730
protected function getConfig($package_name, $config, $add)
2831
{
2932
$cur_config = !empty($config['plugins'])

src/RoundcubeInstaller.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ class RoundcubeInstaller implements PluginInterface
1111
private $extentions = [PluginInstaller::class, SkinInstaller::class];
1212
private $installers = [];
1313

14+
#[\Override]
1415
public function activate(Composer $composer, IOInterface $io)
1516
{
1617
foreach ($this->extentions as $extension) {
@@ -20,12 +21,14 @@ public function activate(Composer $composer, IOInterface $io)
2021
}
2122
}
2223

24+
#[\Override]
2325
public function deactivate(Composer $composer, IOInterface $io)
2426
{
2527
foreach ($this->installers as $installer) {
2628
$composer->getInstallationManager()->removeInstaller($installer);
2729
}
2830
}
2931

32+
#[\Override]
3033
public function uninstall(Composer $composer, IOInterface $io) {}
3134
}

src/SkinInstaller.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,13 @@ class SkinInstaller extends ExtensionInstaller
66
{
77
protected $composer_type = 'roundcube-skin';
88

9+
#[\Override]
910
public function getVendorDir()
1011
{
1112
return $this->getRoundcubemailInstallPath() . \DIRECTORY_SEPARATOR . 'skins';
1213
}
1314

15+
#[\Override]
1416
protected function confirmInstall($package_name)
1517
{
1618
$config = $this->composer->getConfig()->get('roundcube');
@@ -24,6 +26,7 @@ protected function confirmInstall($package_name)
2426
return $answer;
2527
}
2628

29+
#[\Override]
2730
protected function getConfig($package_name, $config, $add)
2831
{
2932
$cur_config = !empty($config['skin'])

0 commit comments

Comments
 (0)