forked from larastan/larastan
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
51 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Custom config parameters | ||
|
||
All custom config parameters that are defined by Larastan are listed here. | ||
|
||
## `noUnnecessaryCollectionCall`, `noUnnecessaryCollectionCallOnly`, `noUnnecessaryCollectionCallExcept` | ||
|
||
These parameters are related to the `NoUnnecessaryCollectionCall` rule. You can find the details about these parameters and the rule [here](rules.md#NoUnnecessaryCollectionCall). | ||
|
||
## `databaseMigrationsPath` | ||
|
||
By default, the default Laravel database migration path (`database/migrations`) is used to scan migration files to understand the table structure and model properties. If you have database migrations in other place then the default, you can use this config parameter to tell Larastan where the database migrations are stored. | ||
|
||
You can give an absolute path, or a path relative to the PHPStan config file. | ||
|
||
#### Example | ||
```neon | ||
parameters: | ||
databaseMigrationsPath: ../custom/migrations/path | ||
``` | ||
|
||
## `checkModelProperties` | ||
**default**: `false` | ||
|
||
This config parameter enables the checks for model properties that are passed to methods. You can read the details [here](rules.md#modelpropertyrule). | ||
|
||
To enable you can set it to `true`: | ||
|
||
```neon | ||
parameters: | ||
checkModelProperties: true | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters