From 8380e99b8aa7d4e96d2215c3be06d3db17d9c195 Mon Sep 17 00:00:00 2001 From: SonyPradana Date: Sun, 31 Dec 2023 10:23:12 +0700 Subject: [PATCH] chore, formatting: bump dependency --- composer.json | 2 +- src/System/Console/helper.php | 21 +++++++++++---------- src/System/Integrate/Application.php | 2 +- src/System/Time/helper.php | 2 +- src/System/View/View.php | 2 +- tests/Template/BasicTemplateTest.php | 6 +++--- 6 files changed, 18 insertions(+), 17 deletions(-) diff --git a/composer.json b/composer.json index eab4e0d8..4184a292 100644 --- a/composer.json +++ b/composer.json @@ -18,7 +18,7 @@ "require-dev": { "phpunit/phpunit": "^9.6", "mockery/mockery": "^1.6", - "friendsofphp/php-cs-fixer": "^3.38", + "friendsofphp/php-cs-fixer": "^3.45", "phpstan/phpstan": "^1.10", "rector/rector": "^0.17" }, diff --git a/src/System/Console/helper.php b/src/System/Console/helper.php index e8753e59..d1a5245c 100644 --- a/src/System/Console/helper.php +++ b/src/System/Console/helper.php @@ -4,6 +4,7 @@ namespace System\Console; +use System\Console\Style\Alert; use System\Console\Style\Style; use System\Console\Traits\TerminalTrait; @@ -13,11 +14,11 @@ * * @param string $text * - * @return \System\Console\Style\Style + * @return Style */ function style($text) { - return new \System\Console\Style\Style($text); + return new Style($text); } } @@ -27,11 +28,11 @@ function style($text) * * @param string $text * - * @return \System\Console\Style\Style + * @return Style */ function info($text) { - return \System\Console\Style\Alert::render()->info($text); + return Alert::render()->info($text); } } @@ -41,11 +42,11 @@ function info($text) * * @param string $text * - * @return \System\Console\Style\Style + * @return Style */ function warn($text) { - return \System\Console\Style\Alert::render()->warn($text); + return Alert::render()->warn($text); } } @@ -55,11 +56,11 @@ function warn($text) * * @param string $text * - * @return \System\Console\Style\Style + * @return Style */ function fail($text) { - return \System\Console\Style\Alert::render()->fail($text); + return Alert::render()->fail($text); } } @@ -69,11 +70,11 @@ function fail($text) * * @param string $text * - * @return \System\Console\Style\Style + * @return Style */ function ok($text) { - return \System\Console\Style\Alert::render()->ok($text); + return Alert::render()->ok($text); } } diff --git a/src/System/Integrate/Application.php b/src/System/Integrate/Application.php index 9904d1ac..b551301a 100644 --- a/src/System/Integrate/Application.php +++ b/src/System/Integrate/Application.php @@ -159,7 +159,7 @@ public function __construct(string $base_path) // base binding static::$app = $this; $this->set('app', $this); - $this->set(\System\Integrate\Application::class, $this); + $this->set(Application::class, $this); $this->set(Container::class, $this); // load config and load provider diff --git a/src/System/Time/helper.php b/src/System/Time/helper.php index ff00cdae..51013efa 100644 --- a/src/System/Time/helper.php +++ b/src/System/Time/helper.php @@ -9,7 +9,7 @@ * @param string $date_format Set current time * @param string $time_zone Set timezone * - * @return \System\Time\Now + * @return System\Time\Now */ function now(string $date_format = 'now', string $time_zone = null) { diff --git a/src/System/View/View.php b/src/System/View/View.php index 24cdf871..6e2ca8e2 100644 --- a/src/System/View/View.php +++ b/src/System/View/View.php @@ -37,7 +37,7 @@ public static function render(string $view_path, array $portal = []) // send render content to client return (new Response()) ->setContent($html) - ->setResponeCode(\System\Http\Response::HTTP_OK) + ->setResponeCode(Response::HTTP_OK) ->removeHeader([ 'Expires', 'Pragma', diff --git a/tests/Template/BasicTemplateTest.php b/tests/Template/BasicTemplateTest.php index 5e63e79f..6cc0d730 100644 --- a/tests/Template/BasicTemplateTest.php +++ b/tests/Template/BasicTemplateTest.php @@ -30,7 +30,7 @@ public function itCanGenerateBasicClass(): void $class ->use(System\Template\Generate::class) - ->extend(\PHPUnit\Framework\TestCase::class) + ->extend(TestCase::class) ->implement('testInterface') ->setEndWithNewLine(); @@ -48,7 +48,7 @@ public function itCanGenerateClassWithTraitPropertyAndMethod() $class ->use(System\Template\Generate::class) - ->extend(\PHPUnit\Framework\TestCase::class) + ->extend(TestCase::class) ->implement('testInterface') ->traits([ PhpParser\Builder\TraitUseAdaptation::class, @@ -77,7 +77,7 @@ public function itCanGenerateClassWithTraitPropertyAndMethodFromTemplate() ->tabSize(2) ->use(System\Template\Generate::class) - ->extend(\PHPUnit\Framework\TestCase::class) + ->extend(TestCase::class) ->implement('testInterface') ->traits([ PhpParser\Builder\TraitUseAdaptation::class,