| 1 | <?php |
||
| 15 | final class ImportSniff implements Sniff |
||
| 16 | { |
||
| 17 | /** |
||
| 18 | * Namespace separator count. |
||
| 19 | * |
||
| 20 | * @var int |
||
| 21 | */ |
||
| 22 | private $nsSeperatorCount = 0; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * Code when FQN is found. |
||
| 26 | * |
||
| 27 | * @var string |
||
| 28 | */ |
||
| 29 | public const CODE_FQN_FOUND = 'FQNFound'; |
||
| 30 | |||
| 31 | /** |
||
| 32 | * Warning message if a FQN is found. |
||
| 33 | * |
||
| 34 | * @var string |
||
| 35 | */ |
||
| 36 | public const ERROR_FQN_NOT_ALLOWED = 'FQN not allowed!'; |
||
| 37 | |||
| 38 | /** |
||
| 39 | * Register. |
||
| 40 | * |
||
| 41 | * @return int[] |
||
| 42 | */ |
||
| 43 | public function register(): array |
||
| 50 | |||
| 51 | /** |
||
| 52 | * Check if there is any FQN. |
||
| 53 | * |
||
| 54 | * @param File $file |
||
| 55 | * @param int $position |
||
| 56 | */ |
||
| 57 | public function process(File $file, $position): void |
||
| 84 | } |
||
| 85 |