diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 3812e72..f8f6daf 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -3,6 +3,7 @@ includes: parameters: level: 4 + checkMissingOverrideMethodAttribute: true paths: - . excludePaths: diff --git a/src/ExtensionInstaller.php b/src/ExtensionInstaller.php index 3ea5a77..b4272ac 100644 --- a/src/ExtensionInstaller.php +++ b/src/ExtensionInstaller.php @@ -67,6 +67,7 @@ protected function getRoundcubemailInstallPath(): string return $this->roundcubemailInstallPath; } + #[\Override] public function getInstallPath(PackageInterface $package) { if (!$this->supports($package->getType())) { @@ -87,6 +88,7 @@ private function initializeRoundcubemailEnvironment(): void require_once INSTALL_PATH . 'program/include/iniset.php'; } + #[\Override] public function isInstalled(InstalledRepositoryInterface $repo, PackageInterface $package) { $this->setRoundcubemailInstallPath($repo); @@ -94,6 +96,7 @@ public function isInstalled(InstalledRepositoryInterface $repo, PackageInterface return parent::isInstalled($repo, $package); } + #[\Override] public function install(InstalledRepositoryInterface $repo, PackageInterface $package) { $this->setRoundcubemailInstallPath($repo); @@ -155,6 +158,7 @@ public function install(InstalledRepositoryInterface $repo, PackageInterface $pa return null; } + #[\Override] public function update(InstalledRepositoryInterface $repo, PackageInterface $initial, PackageInterface $target) { $this->setRoundcubemailInstallPath($repo); @@ -220,6 +224,7 @@ public function update(InstalledRepositoryInterface $repo, PackageInterface $ini return null; } + #[\Override] public function uninstall(InstalledRepositoryInterface $repo, PackageInterface $package) { $this->setRoundcubemailInstallPath($repo); @@ -261,6 +266,7 @@ public function uninstall(InstalledRepositoryInterface $repo, PackageInterface $ return null; } + #[\Override] public function supports($packageType) { return $packageType === $this->composer_type; diff --git a/src/PluginInstaller.php b/src/PluginInstaller.php index e09fbe4..99356c0 100644 --- a/src/PluginInstaller.php +++ b/src/PluginInstaller.php @@ -6,11 +6,13 @@ class PluginInstaller extends ExtensionInstaller { protected $composer_type = 'roundcube-plugin'; + #[\Override] public function getVendorDir() { return $this->getRoundcubemailInstallPath() . \DIRECTORY_SEPARATOR . 'plugins'; } + #[\Override] protected function confirmInstall($package_name) { $config = $this->composer->getConfig()->get('roundcube'); @@ -24,6 +26,7 @@ protected function confirmInstall($package_name) return $answer; } + #[\Override] protected function getConfig($package_name, $config, $add) { $cur_config = !empty($config['plugins']) diff --git a/src/RoundcubeInstaller.php b/src/RoundcubeInstaller.php index a7f81fe..5f117c5 100644 --- a/src/RoundcubeInstaller.php +++ b/src/RoundcubeInstaller.php @@ -11,6 +11,7 @@ class RoundcubeInstaller implements PluginInterface private $extentions = [PluginInstaller::class, SkinInstaller::class]; private $installers = []; + #[\Override] public function activate(Composer $composer, IOInterface $io) { foreach ($this->extentions as $extension) { @@ -20,6 +21,7 @@ public function activate(Composer $composer, IOInterface $io) } } + #[\Override] public function deactivate(Composer $composer, IOInterface $io) { foreach ($this->installers as $installer) { @@ -27,5 +29,6 @@ public function deactivate(Composer $composer, IOInterface $io) } } + #[\Override] public function uninstall(Composer $composer, IOInterface $io) {} } diff --git a/src/SkinInstaller.php b/src/SkinInstaller.php index 4d9cee5..1e8c29b 100644 --- a/src/SkinInstaller.php +++ b/src/SkinInstaller.php @@ -6,11 +6,13 @@ class SkinInstaller extends ExtensionInstaller { protected $composer_type = 'roundcube-skin'; + #[\Override] public function getVendorDir() { return $this->getRoundcubemailInstallPath() . \DIRECTORY_SEPARATOR . 'skins'; } + #[\Override] protected function confirmInstall($package_name) { $config = $this->composer->getConfig()->get('roundcube'); @@ -24,6 +26,7 @@ protected function confirmInstall($package_name) return $answer; } + #[\Override] protected function getConfig($package_name, $config, $add) { $cur_config = !empty($config['skin'])