Skip to content

Commit

Permalink
Made phpstan and phpcs happy
Browse files Browse the repository at this point in the history
  • Loading branch information
blackshadev committed Dec 5, 2024
1 parent f6285a9 commit b93674c
Show file tree
Hide file tree
Showing 12 changed files with 9 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace Tempest\Router\Exceptions;

use Exception;
use Tempest\Router\Construction\DiscoveredRoute;
use Tempest\Router\Routing\Construction\DiscoveredRoute;

final class ControllerActionHasNoReturn extends Exception
{
Expand Down
2 changes: 1 addition & 1 deletion src/Tempest/Router/src/GenericRouter.php
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ public function toUri(array|string $action, ...$params): string

$uri = $uri->replaceRegex(
'#\{' . $key . DiscoveredRoute::ROUTE_PARAM_CUSTOM_REGEX . '\}#',
(string)$value
(string) $value,
);
}

Expand Down
2 changes: 1 addition & 1 deletion src/Tempest/Router/src/RouteConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

namespace Tempest\Router;

use Tempest\Router\Routing\Matching\MatchingRegex;
use Tempest\Router\Routing\Construction\DiscoveredRoute;
use Tempest\Router\Routing\Matching\MatchingRegex;

final class RouteConfig
{
Expand Down
2 changes: 1 addition & 1 deletion src/Tempest/Router/src/RouteDiscovery.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
use Tempest\Core\Discovery;
use Tempest\Core\DiscoveryLocation;
use Tempest\Core\IsDiscovery;
use Tempest\Reflection\ClassReflector;
use Tempest\Router\Routing\Construction\DiscoveredRoute;
use Tempest\Router\Routing\Construction\RouteConfigurator;
use Tempest\Reflection\ClassReflector;

final class RouteDiscovery implements Discovery
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public function split(): array
$parts = explode('/', $this->uri);

return array_values(
array_filter($parts, static fn (string $part) => $part !== '')
array_filter($parts, static fn (string $part) => $part !== ''),
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

namespace Tempest\Router\Routing\Construction;


/**
* @internal
*/
Expand Down
4 changes: 2 additions & 2 deletions src/Tempest/Router/tests/FakeRouteBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@

use ReflectionMethod;
use Tempest\Http\Method;
use Tempest\Router\Routing\Construction\DiscoveredRoute;
use Tempest\Router\Routing\Construction\MarkedRoute;
use Tempest\Reflection\MethodReflector;
use Tempest\Router\Route;
use Tempest\Router\Routing\Construction\DiscoveredRoute;
use Tempest\Router\Routing\Construction\MarkedRoute;

final readonly class FakeRouteBuilder implements Route
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@

use PHPUnit\Framework\TestCase;
use Tempest\Http\Method;
use Tempest\Router\Delete;
use Tempest\Router\Patch;
use Tempest\Router\Put;
use Tempest\Router\Route;
use Tempest\Router\RouteConfig;
use Tempest\Router\Routing\Construction\RouteConfigurator;
use Tempest\Router\Routing\Matching\MatchingRegex;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public function test_chunked_routes(): void
for ($i = 0; $i <= 1000; $i++) {
$mark = str_increment($mark);
$subject->add(
$routeBuilder->withUri("/test/{$i}/route_{$i}")->asMarkedRoute($mark)
$routeBuilder->withUri("/test/{$i}/route_{$i}")->asMarkedRoute($mark),
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
use Laminas\Diactoros\ServerRequest;
use PHPUnit\Framework\TestCase;
use Tempest\Http\Method;
use Tempest\Router\Tests\FakeRouteBuilder;
use Tempest\Router\RouteConfig;
use Tempest\Router\Routing\Matching\GenericRouteMatcher;
use Tempest\Router\Routing\Matching\MatchingRegex;
use Tempest\Router\Tests\FakeRouteBuilder;

/**
* @internal
Expand Down
1 change: 0 additions & 1 deletion tests/Architecture/ArchitectureTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
use PHPat\Test\Builder\Rule;
use PHPat\Test\PHPat;
use Tempest\Framework\Testing\IntegrationTest;
use Tempest\Router\Route;

final class ArchitectureTestCase
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
use PhpBench\Attributes\BeforeMethods;
use PhpBench\Attributes\Revs;
use PhpBench\Attributes\Warmup;
use Tempest\Http\Method;
use Tempest\Router\Route;
use Tempest\Router\Routing\Construction\RouteConfigurator;
use Tempest\Router\Tests\FakeRouteBuilder;

Expand Down

0 comments on commit b93674c

Please sign in to comment.