Skip to content

Commit

Permalink
chore, formatting: bump dependency (#262)
Browse files Browse the repository at this point in the history
  • Loading branch information
SonyPradana authored Dec 31, 2023
1 parent ee7ae8f commit 1c25a30
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 17 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
21 changes: 11 additions & 10 deletions src/System/Console/helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

namespace System\Console;

use System\Console\Style\Alert;
use System\Console\Style\Style;
use System\Console\Traits\TerminalTrait;

Expand All @@ -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);
}
}

Expand All @@ -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);
}
}

Expand All @@ -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);
}
}

Expand All @@ -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);
}
}

Expand All @@ -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);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/System/Integrate/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/System/Time/helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
2 changes: 1 addition & 1 deletion src/System/View/View.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
6 changes: 3 additions & 3 deletions tests/Template/BasicTemplateTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand All @@ -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,
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 1c25a30

Please sign in to comment.