Total Complexity | 3 |
Total Lines | 39 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php declare(strict_types = 1); |
||
8 | class ClassLengthSniff implements PHP_CodeSniffer_Sniff |
||
9 | { |
||
10 | |||
11 | /** |
||
12 | * The maximum number of lines a class |
||
13 | * should have. |
||
14 | * @var integer |
||
15 | */ |
||
16 | public $maxLength = 200; |
||
17 | |||
18 | /** |
||
19 | * Returns the token types that this sniff is interested in. |
||
20 | * @return array |
||
21 | */ |
||
22 | public function register(): array |
||
23 | { |
||
24 | return [T_CLASS]; |
||
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 int $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) |
||
47 | } |
||
48 | } |
||
50 |