| Total Complexity | 4 |
| Total Lines | 45 |
| Duplicated Lines | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php declare(strict_types = 1); |
||
| 8 | class FunctionLengthSniff implements PHP_CodeSniffer_Sniff |
||
| 9 | { |
||
| 10 | |||
| 11 | /** |
||
| 12 | * The maximum number of lines a function or method |
||
| 13 | * should have. |
||
| 14 | * @var integer |
||
| 15 | */ |
||
| 16 | public $maxLength = 20; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * Returns the token types that this sniff is interested in. |
||
| 20 | * @return array |
||
| 21 | */ |
||
| 22 | public function register(): array |
||
| 25 | } |
||
| 26 | |||
| 27 | /** |
||
| 28 | * Processes the tokens that this sniff is interested in. |
||
| 29 | * |
||
| 30 | * @param PHP_CodeSniffer_File $phpcsFile The file where the token was found. |
||
| 31 | * @param integer $stackPtr The position in the stack where |
||
| 32 | * the token was found. |
||
| 33 | * @return void |
||
| 34 | */ |
||
| 35 | public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) |
||
| 56 |