diff --git a/.github/workflows/php-cs-fixer.yml b/.github/workflows/php-cs-fixer.yml deleted file mode 100644 index 70be7a6..0000000 --- a/.github/workflows/php-cs-fixer.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: Check and fix code styling with php-cs-fixer - -on: - pull_request: - push: - branches: - - master - -jobs: - style: - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@v2 - with: - ref: ${{ github.head_ref }} - - - name: Run php-cs-fixer - uses: docker://oskarstark/php-cs-fixer-ga - with: - args: --config=.php_cs.dist --allow-risky=yes - - - name: Commit changes - uses: stefanzweifel/git-auto-commit-action@v4.10.0 - with: - commit_message: Automatically applied php-cs-fixer changes diff --git a/.github/workflows/php-unit.yml b/.github/workflows/php-unit.yml deleted file mode 100644 index f6b0b11..0000000 --- a/.github/workflows/php-unit.yml +++ /dev/null @@ -1,39 +0,0 @@ -name: Check if all phpunit tests are passing or not - -on: - pull_request: - push: - branches: - - master - -jobs: - test: - runs-on: ${{ matrix.os }} - strategy: - fail-fast: true - matrix: - os: [ ubuntu-latest ] - php: [ 7.4, 8.0 ] - laravel: [ 8.* ] - dependency-version: [ prefer-stable ] - include: - - laravel: 8.* - - name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }} - ${{ matrix.os }} - - steps: - - name: Checkout code - uses: actions/checkout@v2 - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php }} - extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick - coverage: none - - - name: Install Dependencies - run: composer install -q --no-ansi --no-interaction --no-scripts --no-suggest --no-progress --prefer-dist - - - name: Execute tests - run: vendor/bin/phpunit diff --git a/src/Commands/PrettyRoutesCommand.php b/src/Commands/PrettyRoutesCommand.php index bc7bc48..cae4060 100644 --- a/src/Commands/PrettyRoutesCommand.php +++ b/src/Commands/PrettyRoutesCommand.php @@ -187,7 +187,6 @@ protected function displayRoutes(array $routes) 'PATCH' => 'yellow', 'DELETE' => 'red', ][$m] ?? 'white'; - return sprintf("%s", $color, $m); }, explode('|', $method))); diff --git a/tests/SnapshotTest.php b/tests/SnapshotTest.php index e88665c..4a5b452 100644 --- a/tests/SnapshotTest.php +++ b/tests/SnapshotTest.php @@ -3,6 +3,7 @@ namespace Wulfheart\PrettyRoutes\Tests; + use Illuminate\Support\Facades\Artisan; use Spatie\Snapshots\MatchesSnapshots; diff --git a/tests/TestCase.php b/tests/TestCase.php index 64f9a42..850d4ba 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -24,11 +24,11 @@ public function defineRoutes($router): void return view('welcome'); }); - $router->get('admin', fn () => true); + $router->get('admin', fn() => true); $router->resource('test', Controller::class); - $router->get('/{one?}/{two}/some/{three?}', fn () => true); - $router->post('some/thing/{one?}/{two}/some/{three?}', fn () => true); + $router->get('/{one?}/{two}/some/{three?}', fn() => true); + $router->post('some/thing/{one?}/{two}/some/{three?}', fn() => true); } }