| 1 | <?php |
||
| 13 | class FileStartLineReview implements FileTool { |
||
| 14 | |||
| 15 | const NAME = 'php_file_start_line_review'; |
||
| 16 | |||
| 17 | const REGEXP = [ |
||
| 18 | '~^<\?php(\s+|$)~', |
||
| 19 | '~^<\?(\s+|$)~', |
||
| 20 | '~#!/usr/bin/env php(\s+|$)~', |
||
| 21 | ]; |
||
| 22 | |||
| 23 | |||
| 24 | /** |
||
| 25 | * @inheritdoc |
||
| 26 | */ |
||
| 27 | 5 | public function getName() { |
|
| 30 | |||
| 31 | |||
| 32 | /** |
||
| 33 | * @inheritdoc |
||
| 34 | */ |
||
| 35 | public function getDescription() { |
||
| 38 | |||
| 39 | |||
| 40 | /** |
||
| 41 | * @inheritdoc |
||
| 42 | */ |
||
| 43 | public function canProcess(File $file) { |
||
| 46 | |||
| 47 | |||
| 48 | /** |
||
| 49 | * @inheritdoc |
||
| 50 | */ |
||
| 51 | 5 | public function process(File $file, Report $report) { |
|
| 64 | |||
| 65 | } |