Skip to content

Commit aecdd3d

Browse files
authored
Merge pull request #7 from 123inkt/enable-checks-and-fix-issues
Enabled checks in github actions
2 parents 240f8be + 5724e3c commit aecdd3d

File tree

2 files changed

+32
-15
lines changed

2 files changed

+32
-15
lines changed

.github/workflows/test.yml

Lines changed: 28 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Run tests
1+
name: Run checks
22

33
on:
44
push:
@@ -7,21 +7,35 @@ on:
77
branches: [ master ]
88

99
jobs:
10-
build:
11-
name: PHP ${{ matrix.php-versions }} Test
10+
test:
11+
name: PHP ${{ matrix.php-versions }} Test ${{ matrix.composer-flags }}
1212
runs-on: ubuntu-latest
1313
strategy:
1414
matrix:
1515
php-versions: ['7.1', '7.2', '7.3']
16+
composer-flags: ['', '--prefer-lowest']
1617
steps:
17-
- uses: actions/checkout@v2
18-
- name: Setup PHP
19-
uses: shivammathur/setup-php@v2
20-
with:
21-
php-version: ${{ matrix.php-versions }}
22-
- name: Validate composer.json and composer.lock
23-
run: composer validate
24-
- name: Install dependencies
25-
run: composer install --prefer-dist --no-progress --no-suggest
26-
- name: Run test suite
27-
run: composer test
18+
- uses: actions/checkout@v2
19+
- name: Setup PHP
20+
uses: shivammathur/setup-php@v2
21+
with:
22+
php-version: ${{ matrix.php-versions }}
23+
- name: Validate composer.json and composer.lock
24+
run: composer validate
25+
- name: Install dependencies
26+
run: composer update --prefer-dist --no-progress --no-suggest --prefer-stable ${{ matrix.composer-flags }}
27+
- name: Run test suite
28+
run: composer test
29+
quality:
30+
name: Quality checks
31+
runs-on: ubuntu-latest
32+
steps:
33+
- uses: actions/checkout@v2
34+
- name: Setup PHP
35+
uses: shivammathur/setup-php@v2
36+
with:
37+
php-version: 7.1
38+
- name: Install dependencies
39+
run: composer install --prefer-dist --no-progress --no-suggest
40+
- name: run checks
41+
run: composer check

src/Renderer/ViolationListRenderer.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,12 @@
99

1010
class ViolationListRenderer
1111
{
12-
/** @var ConstraintViolationListInterface */
12+
/** @var ConstraintViolationListInterface<ConstraintViolationInterface> */
1313
private $violationList;
1414

15+
/**
16+
* @param ConstraintViolationListInterface<ConstraintViolationInterface> $violations
17+
*/
1518
public function __construct(ConstraintViolationListInterface $violations)
1619
{
1720
$this->violationList = $violations;

0 commit comments

Comments
 (0)