From ca56a85628734d6cc326d823c4d83914698be0b2 Mon Sep 17 00:00:00 2001 From: TangRufus Date: Mon, 13 Oct 2025 04:41:38 +0100 Subject: [PATCH] Apply coding style --- bin/php-matrix | 2 +- bin/update-all-versions | 4 ++-- src/Console/ModeOption.php | 3 ++- src/Console/PrintErrorTrait.php | 3 +-- src/Console/SourceOption.php | 3 ++- 5 files changed, 8 insertions(+), 7 deletions(-) diff --git a/bin/php-matrix b/bin/php-matrix index 0623645..5550ca7 100755 --- a/bin/php-matrix +++ b/bin/php-matrix @@ -5,7 +5,7 @@ declare(strict_types=1); use TypistTech\PhpMatrix\Console\Application; -include $_composer_autoload_path ?? __DIR__ . '/../vendor/autoload.php'; +include $_composer_autoload_path ?? __DIR__.'/../vendor/autoload.php'; Application::make() ->run(); diff --git a/bin/update-all-versions b/bin/update-all-versions index 567686e..87b8e19 100755 --- a/bin/update-all-versions +++ b/bin/update-all-versions @@ -6,11 +6,11 @@ declare(strict_types=1); use Composer\Semver\Semver; use TypistTech\PhpMatrix\Releases\PhpNetReleases; -include $_composer_autoload_path ?? __DIR__ . '/../vendor/autoload.php'; +include $_composer_autoload_path ?? __DIR__.'/../vendor/autoload.php'; $releases = new PhpNetReleases; $data = $releases->all(); $data = Semver::rsort($data); $content = json_encode($data, JSON_THROW_ON_ERROR | JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES); -file_put_contents(__DIR__ . '/../resources/all-versions.json', $content); +file_put_contents(__DIR__.'/../resources/all-versions.json', $content); diff --git a/src/Console/ModeOption.php b/src/Console/ModeOption.php index 5c492c8..4e61c4d 100644 --- a/src/Console/ModeOption.php +++ b/src/Console/ModeOption.php @@ -4,9 +4,10 @@ namespace TypistTech\PhpMatrix\Console; +use Attribute; use Symfony\Component\Console\Attribute\Option; -#[\Attribute(\Attribute::TARGET_PARAMETER)] +#[Attribute(Attribute::TARGET_PARAMETER)] class ModeOption extends Option { public function __construct() diff --git a/src/Console/PrintErrorTrait.php b/src/Console/PrintErrorTrait.php index e2fc8d2..91db7c1 100644 --- a/src/Console/PrintErrorTrait.php +++ b/src/Console/PrintErrorTrait.php @@ -10,8 +10,7 @@ trait PrintErrorTrait { private function printError(SymfonyStyle $io, string $message): void { - $io - ->getErrorStyle() + $io->getErrorStyle() ->error($message); } } diff --git a/src/Console/SourceOption.php b/src/Console/SourceOption.php index 0024d8f..e553c8c 100644 --- a/src/Console/SourceOption.php +++ b/src/Console/SourceOption.php @@ -4,9 +4,10 @@ namespace TypistTech\PhpMatrix\Console; +use Attribute; use Symfony\Component\Console\Attribute\Option; -#[\Attribute(\Attribute::TARGET_PARAMETER)] +#[Attribute(Attribute::TARGET_PARAMETER)] class SourceOption extends Option { public function __construct()