Skip to content

Commit

Permalink
PES-2401: PHP parallel lint in pipeline with errors
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-potuznik-z committed Dec 13, 2024
1 parent 0310af9 commit 21ec8b8
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 2 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/run-parallel-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: PHP parallel lint

on:
push:
branches: [ main ]
pull_request:

jobs:
php-parallel-lint:
runs-on: ubuntu-24.04

strategy:
fail-fast: false
matrix:
php-version: [ '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3' ]

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: mbstring, intl
coverage: none

- name: php version
run: php -v

- name: Install php-parallel-lint
run: composer create-project php-parallel-lint/php-parallel-lint ./temp/php-parallel-lint --no-dev

- name: Run PHP parallel lint
run: ./temp/php-parallel-lint/parallel-lint . --exclude ./tests
4 changes: 2 additions & 2 deletions src/Packetery/Module/Order/ApiExtender.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ class ApiExtender {
*
* @var Repository
*/
private $orderRepository;
private Repository $orderRepository;

/**
* Constructor.
*
* @param Repository $orderRepository Order repository.
*/
public function __construct( Repository $orderRepository ) {
public function __construct( Repository $orderRepository, ) {
$this->orderRepository = $orderRepository;
}

Expand Down

0 comments on commit 21ec8b8

Please sign in to comment.