-
Notifications
You must be signed in to change notification settings - Fork 0
Configuration
Yohan Laborda edited this page Jun 26, 2021
·
5 revisions
You need to add the extension.neon in your PHPStan file settings.
includes:
- vendor/yohanlaborda/behaviour/extension.neon
The rule can be configured with various parameters.
parameters:
behaviour:
expressions: ["/^.+(Service)$/", "/^.+(Stage)$/"]
extensions: ["feature", "features"]
maximumIfAllowed: 3
maximumLinesInMethod: 10
maximumLinesInClass: 100
You can use the regular expression you want to parse the files. By default the files ending in NameService.php and NameStage.php are searched.
parameters:
behaviour:
expressions: ["/^.+(Service)$/", "/^.+(Stage)$/"]
To change the extension you must configure the extensions parameter, indicating the desired extensions.
parameters:
behaviour:
extensions: ["feature", "features"]
Number of ifs allowed in a method of a class.
parameters:
behaviour:
maximumIfAllowed: 3
Indicates the number of lines allowed in a method of a class.
parameters:
behaviour:
maximumLinesInMethod: 10
Indicates the number of lines allowed in a class.
parameters:
behaviour:
maximumLinesInClass: 100