Skip to content

Commit

Permalink
Add phpstan - level 6
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeygeno committed Aug 8, 2023
1 parent 740b82a commit dd74162
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 3 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: PHPStan

on:
push:
pull_request:

jobs:
cs:
runs-on: ubuntu-latest

strategy:
fail-fast: true
matrix:
php: [ '7.4', '8.0', '8.1', '8.2' ]
stability: [ prefer-stable ]

name: PHP ${{ matrix.php }} - ${{ matrix.stability }}

steps:
- name: Checkout the code
uses: actions/checkout@v3

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: composer:v2

- name: Install composer dependencies
uses: nick-invision/retry@v2
with:
command: composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-plugins --no-scripts --no-progress
max_attempts: 5
timeout_minutes: 5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Run PHP CodeSniffer
run: vendor/bin/phpstan
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: PHPUnit
name: Tests

on:
push:
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Phone Verification

[![Build Status](https://github.com/alexeygeno/phone-verification-php/workflows/PHPUnit/badge.svg)](https://github.com/alexeygeno/phone-verification-php/actions)
[![Build Status](https://github.com/alexeygeno/phone-verification-php/workflows/Tests/badge.svg)](https://github.com/alexeygeno/phone-verification-php/actions)
[![Build Status](https://github.com/alexeygeno/phone-verification-php/workflows/PHPStan/badge.svg)](https://github.com/alexeygeno/phone-verification-php/actions)
[![Build Status](https://github.com/alexeygeno/phone-verification-php/workflows/CodeSniffer/badge.svg)](https://github.com/alexeygeno/phone-verification-php/actions)
[![Coverage Status](https://coveralls.io/repos/github/alexeygeno/phone-verification-php/badge.svg)](https://coveralls.io/github/alexeygeno/phone-verification-php)

Expand All @@ -15,7 +16,6 @@ This extensible and configurable library allows to set this up just with a few l
- [ Composer](https://getcomposer.org/)
- Supported storage clients: [ Predis](https://github.com/predis/predis), [ MongoDb](https://github.com/mongodb/mongo-php-library)
- Supported sender SDKs: [ Twilio](https://github.com/twilio/twilio-php), [ MessageBird](https://github.com/messagebird/php-rest-api), [Vonage ](https://github.com/Vonage/vonage-php-sdk-core)
- A smile on your face :smile:

## Installation
```shell
Expand Down

0 comments on commit dd74162

Please sign in to comment.