Total Complexity | 7 |
Total Lines | 39 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php declare(strict_types = 1); |
||
8 | class LinesAfterMethodSniff implements PHP_CodeSniffer_Sniff |
||
9 | { |
||
10 | |||
11 | /** |
||
12 | * Returns the token types that this sniff is interested in. |
||
13 | * @return array |
||
14 | */ |
||
15 | public function register(): array |
||
18 | } |
||
19 | |||
20 | /** |
||
21 | * Processes the tokens that this sniff is interested in. |
||
22 | * @param PHP_CodeSniffer_File $phpcsFile The file where the token was found. |
||
23 | * @param integer $stackPtr The position in the stack where |
||
24 | * the token was found. |
||
25 | * @return void |
||
26 | */ |
||
27 | public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) |
||
50 |
If the size of the collection does not change during the iteration, it is generally a good practice to compute it beforehand, and not on each iteration: