Skip to content

Commit

Permalink
Add phpstan check
Browse files Browse the repository at this point in the history
  • Loading branch information
VincentLanglet committed Jul 24, 2024
1 parent 2c6b697 commit 7258898
Show file tree
Hide file tree
Showing 6 changed files with 119 additions and 10 deletions.
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,6 @@ charset = utf-8

[*.json]
indent_size = 2

[composer.json]
indent_size = 4
10 changes: 10 additions & 0 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,13 @@ jobs:
- run: npm run build

- run: npm test

- uses: shivammathur/setup-php@v2
with:
php-version: 8.3
tools: composer:v2
ini-file: development

- run: composer install

- run: composer phpstan
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
node_modules/
.idea
.DS_Store
build
dist/
build/
vendor/
24 changes: 15 additions & 9 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
{
"name": "weglot/languages",
"description": "A comprehensive dataset containing language codes and names compatible with Weglot.",
"type": "library",
"minimum-stability": "stable",
"license": "proprietary",
"autoload": {
"psr-4": {
"WeglotLanguages\\": "dist/"
"name": "weglot/languages",
"description": "A comprehensive dataset containing language codes and names compatible with Weglot.",
"type": "library",
"minimum-stability": "stable",
"license": "proprietary",
"autoload": {
"psr-4": {
"WeglotLanguages\\": "dist/"
}
},
"require-dev": {
"phpstan/phpstan": "1.11.*"
},
"scripts": {
"phpstan": "vendor/bin/phpstan"
}
}
}
77 changes: 77 additions & 0 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions phpstan.dist.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
includes:
- vendor/phpstan/phpstan/conf/bleedingEdge.neon

parameters:
level: 9
paths:
- dist/
exceptions:
check:
missingCheckedExceptionInThrows: true
tooWideThrowType: true
reportUncheckedExceptionDeadCatch: false
implicitThrows: false

0 comments on commit 7258898

Please sign in to comment.