-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Remove useless ternaries If these expressions are truish inside the condition, they will still be truish inside the if. * Describe properties more accurately These are not objects, they are strings holding class names for classes that implement TreeWalker. * Remove duplicate key Comparison::IS and Comparison::EQ are the same. I chose to remove IS because it does not seem to exist anymore on master * Remove unwanted . before = operator This worked, but makes no sense. * Setup static analysis with Psalm * Move PHPStan to Github actions
- Loading branch information
Showing
11 changed files
with
840 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
name: CI | ||
|
||
on: | ||
pull_request: | ||
|
||
jobs: | ||
static-analysis-phpstan: | ||
name: "Static Analysis with PHPStan" | ||
runs-on: "ubuntu-latest" | ||
|
||
strategy: | ||
matrix: | ||
php-version: | ||
- "7.4" | ||
|
||
steps: | ||
- name: "Checkout code" | ||
uses: "actions/checkout@v2" | ||
|
||
- name: "Install PHP" | ||
uses: "shivammathur/setup-php@v2" | ||
with: | ||
coverage: "none" | ||
php-version: "${{ matrix.php-version }}" | ||
tools: cs2pr | ||
|
||
- name: "Cache dependencies installed with composer" | ||
uses: "actions/cache@v1" | ||
with: | ||
path: "~/.composer/cache" | ||
key: "php-${{ matrix.php-version }}-composer-locked-${{ hashFiles('composer.lock') }}" | ||
restore-keys: "php-${{ matrix.php-version }}-composer-locked-" | ||
|
||
- name: "Install dependencies with composer" | ||
run: "composer install --no-progress --no-suggest --no-interaction --prefer-dist" | ||
|
||
- name: "Run a static analysis with phpstan/phpstan" | ||
run: "php vendor/bin/phpstan analyse --error-format=checkstyle | cs2pr" | ||
|
||
static-analysis-psalm: | ||
name: "Static Analysis with Psalm" | ||
runs-on: "ubuntu-latest" | ||
|
||
strategy: | ||
matrix: | ||
php-version: | ||
- "7.4" | ||
|
||
steps: | ||
- name: "Checkout code" | ||
uses: "actions/checkout@v2" | ||
|
||
- name: "Install PHP" | ||
uses: "shivammathur/setup-php@v2" | ||
with: | ||
coverage: "none" | ||
php-version: "${{ matrix.php-version }}" | ||
|
||
- name: "Cache dependencies installed with composer" | ||
uses: "actions/cache@v1" | ||
with: | ||
path: "~/.composer/cache" | ||
key: "php-${{ matrix.php-version }}-composer-locked-${{ hashFiles('composer.lock') }}" | ||
restore-keys: "php-${{ matrix.php-version }}-composer-locked-" | ||
|
||
- name: "Install dependencies with composer" | ||
run: "composer install --no-interaction --no-progress --no-suggest" | ||
|
||
- name: "Run a static analysis with vimeo/psalm" | ||
run: "vendor/bin/psalm --show-info=false --stats --output-format=github --threads=$(nproc)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.