Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/on_pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ jobs:
run: composer validate --strict --no-check-lock
- name: Install Composer dependencies (with dev)
run: composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader
- name: Run phpcs
run: composer phpcs
- name: Run phpstan
run: composer phpstan
- name: Install Composer dependencies (without dev)
run: composer install --no-progress --no-dev --no-suggest --prefer-dist --optimize-autoloader

Expand Down
4 changes: 3 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,12 @@
"sort-packages": true
},
"require-dev": {
"phpstan/phpstan": "^2.1",
"squizlabs/php_codesniffer": "^3.7"
},
"scripts": {
"phpcs": "phpcs",
"phpcbf": "phpcbf"
"phpcbf": "phpcbf",
"phpstan": "phpstan analyse"
}
}
10 changes: 10 additions & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
parameters:
level: 8
paths:
- src

# Ignore tests directory for now
excludePaths:
- vendor/*

reportUnmatchedIgnoredErrors: false
2 changes: 1 addition & 1 deletion src/ToArrayInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ interface ToArrayInterface
/**
* Converts object to array
*
* @return array
* @return array<string, mixed>
*/
public function toArray(): array;
}