Skip to content

Commit

Permalink
chore, formatting: bump dependency (#241)
Browse files Browse the repository at this point in the history
- update php-cs-fixer 3.38
- formatting: function_declaration, binary_operator_spaces
  • Loading branch information
SonyPradana authored Nov 8, 2023
1 parent 5e9267e commit b058ffc
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 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.27",
"friendsofphp/php-cs-fixer": "^3.38",
"phpstan/phpstan": "^1.10",
"rector/rector": "^0.17"
},
Expand Down
2 changes: 1 addition & 1 deletion src/System/Integrate/Http/Karnel.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public function handle(Request $request)
$pipeline = array_reduce(
array_merge($this->middleware, $dispatcher['middleware']),
fn ($next, $middleware) => fn ($req) => $this->app->call([$middleware, 'handle'], ['request' => $req, 'next' => $next]),
fn () => $this->responesType($dispatcher['callable'], $dispatcher['parameters'])
fn () => $this->responesType($dispatcher['callable'], $dispatcher['parameters'])
);

return $pipeline($request);
Expand Down
2 changes: 1 addition & 1 deletion src/System/Router/Router.php
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ public static function run($basepath = '', $case_matters = false, $trailing_slas
->multimatch($multimatch)
->run(
fn ($current, $params) => call_user_func_array($current, $params),
fn ($path) => call_user_func_array(self::$pathNotFound, [$path]),
fn ($path) => call_user_func_array(self::$pathNotFound, [$path]),
fn ($path, $method) => call_user_func_array(self::$methodNotAllowed, [$path, $method])
);

Expand Down
10 changes: 5 additions & 5 deletions tests/Router/RouteDispatchTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public function itCanResultCurrentRoute()

$dispatch = $dispatcher->run(
fn ($callable, $params) => call_user_func_array($callable, $params),
fn ($path) => 'not found - ',
fn ($path) => 'not found - ',
fn ($path, $method) => 'method not allowd - - ',
);

Expand All @@ -48,7 +48,7 @@ public function itCanDispatchAndCall()

$dispatch = $dispatcher->run(
fn ($callable, $params) => call_user_func_array($callable, $params),
fn ($path) => 'not found - ',
fn ($path) => 'not found - ',
fn ($path, $method) => 'method not allowd - - ',
);

Expand All @@ -64,7 +64,7 @@ public function itCanDispatchAndRunFound()

$dispatch = $dispatcher->run(
fn () => 'found',
fn ($path) => 'not found - ',
fn ($path) => 'not found - ',
fn ($path, $method) => 'method not allowd - - ',
);

Expand All @@ -80,7 +80,7 @@ public function itCanDispatchAndRunNotFound()

$dispatch = $dispatcher->run(
fn () => 'found',
fn ($path) => 'not found - ',
fn ($path) => 'not found - ',
fn ($path, $method) => 'method not allowd - - ',
);

Expand All @@ -96,7 +96,7 @@ public function itCanDispatchAndRunMethodNotAllowed()

$dispatch = $dispatcher->run(
fn () => 'found',
fn ($path) => 'not found - ',
fn ($path) => 'not found - ',
fn ($path, $method) => 'method not allowd - - ',
);

Expand Down

0 comments on commit b058ffc

Please sign in to comment.