Skip to content

Commit

Permalink
add phpstan
Browse files Browse the repository at this point in the history
  • Loading branch information
realFlowControl committed May 31, 2023
1 parent 12bc1e2 commit 2dbc2db
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 1 deletion.
18 changes: 18 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,24 @@ jobs:
- uses: actions/checkout@v2
- id: supported-versions-matrix
uses: WyriHaximus/github-action-composer-php-versions-in-range@v1
static-anylsis:
name: "Run static analysis"
runs-on: ubuntu-latest
strategy:
fail-fast: true
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
extensions: mbstring, ctype, iconv, bcmath, filter, json
tools: composer
- name: Install Dependencies
uses: ramsey/composer-install@v2
- name: Run PHPStan
run: ./vendor/bin/phpstan analyze src --level 0
test:
name: "Run Tests on PHP ${{ matrix.php }} against RabbitMQ ${{ matrix.rabbitmq }} (Composer: ${{ matrix.composer }}; TLS: ${{ matrix.ssl_test }})"
runs-on: ubuntu-latest
Expand Down
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@
"require-dev": {
"ext-pcntl": "*",
"phpunit/phpunit": "^9.5 || ^7.5.20",
"symfony/process": "^6.1 || ^4.4"
"symfony/process": "^6.1 || ^4.4",
"phpstan/phpstan": "^1.10"
},
"suggest": {
"ext-pcntl": "For using synchronous AMQP/RabbitMQ client"
Expand Down
1 change: 1 addition & 0 deletions src/Bunny/Protocol/AbstractFrame.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
* uint8 uint16 uint32 size octets uint8
*
* @author Jakub Kulhan <[email protected]>
* @phpstan-consistent-constructor
*/
abstract class AbstractFrame
{
Expand Down
1 change: 1 addition & 0 deletions src/Bunny/Protocol/ContentHeaderFrame.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
*
*
* @author Jakub Kulhan <[email protected]>
* @phpstan-consistent-constructor
*/
class ContentHeaderFrame extends AbstractFrame
{
Expand Down

0 comments on commit 2dbc2db

Please sign in to comment.