Skip to content

Commit

Permalink
Add lint on code
Browse files Browse the repository at this point in the history
  • Loading branch information
ndousson committed Dec 22, 2023
1 parent de9cfd0 commit ca49036
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 14 deletions.
19 changes: 8 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
name: CI

on: [ pull_request, push ]
on:
pull_request:
push:

env:
COMPOSER_UPDATE_FLAGS: "--no-interaction --no-progress --prefer-dist "
Expand Down Expand Up @@ -29,31 +31,26 @@ jobs:
- name: Composer dependencies
run: COMPOSER_UPDATE_FLAGS+="${{matrix.composer_update_flags}}" make vendor

- name: Lint
run: find . -name '*.php' -path './src/*' | parallel -j 4 php -l {}

- name: PHPUnit
run: make phpunit

static-analysis:
runs-on: ubuntu-latest
name: Static analysis
strategy:
fail-fast: false
matrix:
include:
- php: 8.1
composer_update_flags: --prefer-lowest
- php: 8.1
- php: 8.2

steps:
- uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "${{ matrix.php }}"
php-version: "8.2"

- name: Composer dependencies
run: COMPOSER_UPDATE_FLAGS+="${{matrix.composer_update_flags}}" make vendor
run: make vendor

- name: Composer validate
run: make composer-validate
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^3.9",
"phpstan/phpstan": "1.8.2",
"phpstan/phpstan-phpunit": "1.1.1",
"phpstan/phpstan": "1.10.50",
"phpstan/phpstan-phpunit": "1.3.15",
"phpunit/phpunit": "^10.4.2",
"symfony/var-dumper": ">=6.3.8"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
use Doctrine\DBAL\Driver\Middleware;
use Psr\Log\LoggerInterface;

final readonly class RetryLockTimeoutMiddleware implements Middleware
final class RetryLockTimeoutMiddleware implements Middleware
{
public function __construct(
private LoggerInterface $logger,
Expand Down

0 comments on commit ca49036

Please sign in to comment.