|
| 1 | +<?xml version="1.0"?> |
| 2 | +<ruleset name="Optimize function calls" namespace="Nette"> |
| 3 | + <!-- Disable UnusedUses (conflicts with grouped use function/const imports) --> |
| 4 | + <rule ref="SlevomatCodingStandard.Namespaces.UnusedUses"> |
| 5 | + <severity>0</severity> |
| 6 | + </rule> |
| 7 | + |
| 8 | + <!-- Override ReferenceUsedNamesOnly: disable fallback for functions & constants --> |
| 9 | + <rule ref="SlevomatCodingStandard.Namespaces.ReferenceUsedNamesOnly"> |
| 10 | + <properties> |
| 11 | + <property name="allowWhenNoNamespace" value="false"/> |
| 12 | + <property name="allowFullyQualifiedGlobalClasses" value="true"/> |
| 13 | + <property name="allowFullyQualifiedGlobalConstants" value="true"/> |
| 14 | + <property name="allowFullyQualifiedGlobalFunctions" value="true"/> |
| 15 | + <property name="allowFullyQualifiedNameForCollidingConstants" value="true"/> |
| 16 | + <property name="allowFullyQualifiedNameForCollidingFunctions" value="true"/> |
| 17 | + <property name="searchAnnotations" value="true"/> |
| 18 | + </properties> |
| 19 | + </rule> |
| 20 | + |
| 21 | + <!-- Optimize global function and constant calls by generating grouped use statements --> |
| 22 | + <rule ref="../src/NetteCodingStandard/Sniffs/Namespaces/OptimizeGlobalCallsSniff.php"> |
| 23 | + <properties> |
| 24 | + <property name="optimizedFunctionsOnly" value="true"/> |
| 25 | + <property name="ignoredFunctions" type="array"> |
| 26 | + <element value="dump"/> |
| 27 | + <element value="var_dump"/> |
| 28 | + <element value="print_r"/> |
| 29 | + <element value="error_get_last"/> |
| 30 | + <element value="trigger_error"/> |
| 31 | + <element value="debug_backtrace"/> |
| 32 | + </property> |
| 33 | + <property name="ignoredConstants" type="array"> |
| 34 | + <element value="E_*"/> |
| 35 | + <element value="INFO_*"/> |
| 36 | + <element value="CURL*"/> |
| 37 | + <element value="DEBUG_BACKTRACE_IGNORE_ARGS"/> |
| 38 | + </property> |
| 39 | + </properties> |
| 40 | + </rule> |
| 41 | +</ruleset> |
0 commit comments