diff --git a/composer.json b/composer.json index 50a8477..4e84a5d 100644 --- a/composer.json +++ b/composer.json @@ -29,7 +29,7 @@ "composer/semver": "^3.0", "dealerdirect/phpcodesniffer-composer-installer": "^0.7 || ^1.0", "deployer/deployer": "^7.3", - "wearerequired/coding-standards": "^5.0" + "wearerequired/coding-standards": "^6.0" }, "minimum-stability": "dev", "prefer-stable": true, diff --git a/phpcs.xml.dist b/phpcs.xml.dist index 85673f5..56da6f5 100644 --- a/phpcs.xml.dist +++ b/phpcs.xml.dist @@ -6,8 +6,18 @@ + + + + + + + + /src/Plugin\.php + /res/deploy\.tpl\.php + /src/Plugin\.php @@ -20,7 +30,7 @@ /src/Plugin\.php - + /res/deploy\.tpl\.php diff --git a/src/Plugin.php b/src/Plugin.php index a65b78c..25a9c14 100644 --- a/src/Plugin.php +++ b/src/Plugin.php @@ -57,7 +57,7 @@ public function activate( Composer $composer, IOInterface $io ): void { $config = $this->composer->getConfig(); - $this->rootDir = dirname( $config->getConfigSource()->getName() ); + $this->rootDir = \dirname( $config->getConfigSource()->getName() ); } /** @@ -116,14 +116,14 @@ public function copyDeployerConfig( PackageEvent $event ): void { } elseif ( $operation instanceof UpdateOperation ) { $package = $operation->getTargetPackage(); } else { - throw new \Exception( 'Unknown operation: ' . \get_class( $operation ) ); + throw new \Exception( 'Unknown operation: ' . \get_class( $operation ) ); // phpcs:ignore SlevomatCodingStandard.Classes.ModernClassNameReference.ClassNameReferencedViaFunctionCall -- Switch to $operation::class when PHP 8.0 is minimum. } if ( self::PLUGIN_PACKAGE_NAME !== $package->getName() ) { return; } - $source = dirname( __DIR__ ) . '/res/deploy.tpl.php'; + $source = \dirname( __DIR__ ) . '/res/deploy.tpl.php'; $dest = $this->rootDir . '/deploy.php'; $copied = copy( $source, $dest );