Skip to content

Commit d36746e

Browse files
kcassamGummibeer
authored andcommitted
add phpstan and correct till level 5
1 parent 990e2c1 commit d36746e

File tree

3 files changed

+21
-1
lines changed

3 files changed

+21
-1
lines changed

composer.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
"illuminate/support": "^8.0 || ^9.0 || ^10.0 || ^11.0"
3737
},
3838
"require-dev": {
39+
"larastan/larastan": "^2.0",
3940
"laravel/legacy-factories": "^1.0.4",
4041
"laravel/pint": "^1.0",
4142
"mockery/mockery": "^1.3.3",
@@ -66,6 +67,7 @@
6667
},
6768
"scripts": {
6869
"fix": "@php vendor/bin/pint",
70+
"phpstan": "@php vendor/bin/phpstan analyse",
6971
"test": "@php vendor/bin/phpunit",
7072
"test-coverage": "@php vendor/bin/phpunit --coverage-html=build"
7173
}

phpstan.neon

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
includes:
2+
- vendor/larastan/larastan/extension.neon
3+
4+
parameters:
5+
6+
paths:
7+
- src/
8+
9+
# Level 9 is the highest level
10+
level: 6
11+
12+
# ignoreErrors:
13+
# - '#PHPDoc tag @var#'
14+
#
15+
# excludePaths:
16+
# - ./*/*/FileToBeExcluded.php
17+
#
18+
# checkMissingIterableValueType: false

src/Translatable/Exception/LocalesNotDefinedException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ class LocalesNotDefinedException extends \Exception
66
{
77
public static function make(): self
88
{
9-
return new static('Please make sure you have run `php artisan vendor:publish --provider="Astrotomic\Translatable\TranslatableServiceProvider"` and that the locales configuration is defined.');
9+
return new self('Please make sure you have run `php artisan vendor:publish --provider="Astrotomic\Translatable\TranslatableServiceProvider"` and that the locales configuration is defined.');
1010
}
1111
}

0 commit comments

Comments
 (0)