| 1 | <?php |
||
| 13 | class FileStartLineReview implements FileTool { |
||
| 14 | |||
| 15 | const NAME = 'php_file_start_line_review'; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @var array |
||
| 19 | */ |
||
| 20 | private static $regexp = [ |
||
| 21 | '~^<\?php(\s+|$)~', |
||
| 22 | '~^<\?(\s+|$)~', |
||
| 23 | '~#!/usr/bin/env php(\s+|$)~', |
||
| 24 | ]; |
||
| 25 | |||
| 26 | |||
| 27 | /** |
||
| 28 | * @inheritdoc |
||
| 29 | */ |
||
| 30 | 5 | public function getName() { |
|
| 33 | |||
| 34 | |||
| 35 | /** |
||
| 36 | * @inheritdoc |
||
| 37 | */ |
||
| 38 | public function getDescription() { |
||
| 41 | |||
| 42 | |||
| 43 | /** |
||
| 44 | * @inheritdoc |
||
| 45 | */ |
||
| 46 | public function canProcess(File $file) { |
||
| 49 | |||
| 50 | |||
| 51 | /** |
||
| 52 | * @inheritdoc |
||
| 53 | */ |
||
| 54 | 5 | public function process(File $file, Report $report) { |
|
| 67 | |||
| 68 | } |