Skip to content

Commit f0c58fc

Browse files
committed
Fix PHPStan warnings.
1 parent 8a44976 commit f0c58fc

23 files changed

+119
-101
lines changed
Lines changed: 50 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,57 @@
11
# https://help.github.com/en/categories/automating-your-workflow-with-github-actions
22

33
on:
4-
- pull_request
5-
- push
4+
- pull_request
5+
- push
66

77
name: "Continuous Integration"
88

99
jobs:
10-
grumphp:
11-
name: "Grumphp"
12-
13-
runs-on: ubuntu-latest
14-
15-
strategy:
16-
matrix:
17-
php-binary:
18-
- php7.1
19-
- php7.2
20-
- php7.3
21-
22-
steps:
23-
- name: "Checkout"
24-
uses: actions/checkout@master
25-
with:
26-
fetch-depth: 1
27-
28-
- name: "Composer install"
29-
run: ${{ matrix.php-binary }} $(which composer) install --no-interaction --no-progress --no-suggest
30-
31-
- name: "Composer install lowest dependencies"
32-
if: matrix.dependencies == 'lowest'
33-
run: ${{ matrix.php-binary }} $(which composer) update --no-interaction --no-progress --no-suggest --prefer-lowest
34-
35-
- name: "Install Graphviz"
36-
run: sudo apt-get install graphviz
37-
38-
- name: "Run Grumphp"
39-
run: ${{ matrix.php-binary }} vendor/bin/grumphp run
40-
env:
41-
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }}
42-
43-
- name: "Scrutinizer"
44-
run: wget https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml
10+
run:
11+
name: "Grumphp"
12+
runs-on: ${{ matrix.operating-system }}
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
operating-system: [ubuntu-latest, windows-latest, macOS-latest]
17+
php-versions: ['7.1', '7.2', '7.3', '7.4']
18+
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@master
22+
with:
23+
fetch-depth: 1
24+
25+
- name: Install PHP
26+
uses: shivammathur/setup-php@master
27+
with:
28+
php-version: ${{ matrix.php-versions }}
29+
extensions: mbstring,xdebug
30+
- name: Get Composer Cache Directory
31+
id: composer-cache
32+
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
33+
34+
- name: Cache dependencies
35+
uses: actions/cache@v1
36+
with:
37+
path: ${{ steps.composer-cache.outputs.dir }}
38+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
39+
restore-keys: ${{ runner.os }}-composer-
40+
41+
- name: Install dependencies
42+
run: composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader
43+
44+
- name: Run Grumphp
45+
run: vendor/bin/grumphp run --no-ansi -n
46+
env:
47+
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }}
48+
49+
- name: Send PSALM data
50+
run: vendor/bin/psalm --shepherd --stats
51+
continue-on-error: true
52+
53+
- name: Scrutinizer
54+
run: |
55+
wget https://scrutinizer-ci.com/ocular.phar
56+
php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml
57+
continue-on-error: true

composer.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"product"
1414
],
1515
"homepage": "https://github.com/drupol/phpermutations",
16-
"license": "GPL-3.0-only",
16+
"license": "MIT",
1717
"authors": [
1818
{
1919
"name": "Pol Dellaiera",
@@ -24,10 +24,9 @@
2424
"php": ">= 7.1.3"
2525
},
2626
"require-dev": {
27-
"drupol/php-conventions": "^1.6.8",
27+
"drupol/php-conventions": "^1.7.1",
2828
"phpunit/php-code-coverage": "^4 || ^5",
29-
"phpunit/phpunit": "^6 || ^7",
30-
"symfony/process": "^4.4.1"
29+
"phpunit/phpunit": "^6 || ^7"
3130
},
3231
"config": {
3332
"sort-packages": true

src/Combinatorics.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@
66

77
use function count;
88

9-
/**
10-
* Class Combinatorics.
11-
*/
129
abstract class Combinatorics
1310
{
1411
/**

src/Generators/Fibonacci.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@
88
use drupol\phpermutations\Iterators\Fibonacci as FibonacciIterator;
99
use Generator;
1010

11-
/**
12-
* Class Fibonacci.
13-
*/
1411
class Fibonacci extends FibonacciIterator implements GeneratorInterface
1512
{
1613
/**

src/Generators/NGrams.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@
88
use drupol\phpermutations\Iterators\NGrams as NGramsIterator;
99
use Generator;
1010

11-
/**
12-
* Class NGrams.
13-
*/
1411
class NGrams extends NGramsIterator implements GeneratorInterface
1512
{
1613
/**

src/Generators/Perfect.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@
77
use drupol\phpermutations\GeneratorInterface;
88
use drupol\phpermutations\Iterators\Perfect as PerfectIterator;
99

10-
/**
11-
* Class Perfect.
12-
*/
1310
class Perfect extends PerfectIterator implements GeneratorInterface
1411
{
1512
/**

src/Generators/Permutations.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@
1010

1111
use function count;
1212

13-
/**
14-
* Class Permutations.
15-
*/
1613
class Permutations extends Combinatorics implements GeneratorInterface
1714
{
1815
/**

src/Generators/Prime.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@
77
use drupol\phpermutations\GeneratorInterface;
88
use drupol\phpermutations\Iterators\Prime as PrimeIterator;
99

10-
/**
11-
* Class Prime.
12-
*/
1310
class Prime extends PrimeIterator implements GeneratorInterface
1411
{
1512
/**

src/Generators/PrimeFactors.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@
77
use drupol\phpermutations\GeneratorInterface;
88
use drupol\phpermutations\Iterators\PrimeFactors as PrimeFactorsIterator;
99

10-
/**
11-
* Class PrimeFactors.
12-
*/
1310
class PrimeFactors extends PrimeFactorsIterator implements GeneratorInterface
1411
{
1512
/**

src/Generators/Product.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@
1010

1111
use function count;
1212

13-
/**
14-
* Class Product.
15-
*/
1613
class Product extends ProductIterator implements GeneratorInterface
1714
{
1815
/**

0 commit comments

Comments
 (0)