Skip to content

Commit b23afbb

Browse files
authored
Merge pull request #402 from kcassam/main
feat: add phpstan and correct till level 5
2 parents c74dfa5 + 7043d60 commit b23afbb

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"
3737
},
3838
"require-dev": {
39+
"larastan/larastan": "^2.0",
3940
"laravel/legacy-factories": "^1.0.4",
4041
"mockery/mockery": "^1.3.3",
4142
"orchestra/testbench": "^6.0 || ^7.0 || ^8.0",
@@ -65,6 +66,7 @@
6566
},
6667
"scripts": {
6768
"csfix": "php-cs-fixer fix --using-cache=no",
69+
"phpstan": "./vendor/bin/phpstan analyse",
6870
"test": "vendor/bin/phpunit",
6971
"test-coverage": "vendor/bin/phpunit --coverage-html=build"
7072
}

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)