Skip to content

Commit

Permalink
Merge pull request #1690 from hydephp/refactor-to-move-internal-code-…
Browse files Browse the repository at this point in the history
…to-internal-namespace

Clean up internal helper code
  • Loading branch information
caendesilva authored Apr 26, 2024
2 parents 3c5bfb2 + 9251fea commit 430a74b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/framework/src/Console/Commands/RouteListCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,15 @@ public function handle(): int
return Command::SUCCESS;
}

/** @return array<integer, array<string, string>> */
protected function generate(): array
{
return array_map([RouteListItem::class, 'format'], array_values(Hyde::routes()->all()));
return array_map(RouteListItem::format(...), array_values(Hyde::routes()->all()));
}

/** @param array<integer, array<string, string>> $routes */
protected function makeHeader(array $routes): array
{
return array_map([Hyde::class, 'makeTitle'], array_keys($routes[0]));
return array_map(Hyde::makeTitle(...), array_keys($routes[0]));

Check failure on line 44 in packages/framework/src/Console/Commands/RouteListCommand.php

View workflow job for this annotation

GitHub Actions / run-static-analysis-phpstan

Creating callable from a non-native static method Hyde\Hyde::makeTitle().
}
}

0 comments on commit 430a74b

Please sign in to comment.