-
-
Notifications
You must be signed in to change notification settings - Fork 586
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build(ci): Add Rector into static analysis.
- Loading branch information
Marcin Czarnecki
committed
Jan 2, 2024
1 parent
4ff99e4
commit 8c86060
Showing
4 changed files
with
53 additions
and
0 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,35 @@ | ||
name: "Coding Standards" | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- "master" | ||
|
||
jobs: | ||
coding-standards: | ||
name: "Coding Standards" | ||
runs-on: "ubuntu-20.04" | ||
|
||
strategy: | ||
matrix: | ||
php-version: | ||
- "7.4" | ||
|
||
steps: | ||
- name: "Checkout" | ||
uses: "actions/checkout@v2" | ||
|
||
- name: "Install PHP" | ||
uses: "shivammathur/setup-php@v2" | ||
with: | ||
coverage: "none" | ||
php-version: "${{ matrix.php-version }}" | ||
tools: "cs2pr" | ||
extensions: pdo_sqlite | ||
|
||
- name: "Install dependencies with Composer" | ||
uses: "ramsey/composer-install@v1" | ||
|
||
- name: "Run PHP_CodeSniffer" | ||
run: "vendor/bin/phpcs -q --no-colors --report=checkstyle | cs2pr" |
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
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,13 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
use Rector\Config\RectorConfig; | ||
use Rector\Set\ValueObject\LevelSetList; | ||
|
||
return static function (RectorConfig $rectorConfig) { | ||
$rectorConfig->paths([ | ||
__DIR__ . '/src', | ||
]); | ||
$rectorConfig->sets([LevelSetList::UP_TO_PHP_74]); | ||
}; |