| Total Complexity | 1 |
| Total Lines | 28 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 11 | class File extends Resource |
||
| 12 | { |
||
| 13 | /** |
||
| 14 | * @inheritdoc |
||
| 15 | */ |
||
| 16 | public $patterns = [ |
||
| 17 | 'PUT,PATCH,POST {id}' => 'update', |
||
| 18 | 'DELETE {id}' => 'delete', |
||
| 19 | 'GET,HEAD {id}' => 'view', |
||
| 20 | 'POST' => 'create', |
||
| 21 | 'GET,HEAD' => 'index', |
||
| 22 | '{id}' => 'options', |
||
| 23 | 'GET {id}.{ext}' => 'file-stream', |
||
| 24 | '' => 'options', |
||
| 25 | ]; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @var string[] list of valid extensions that this rule can handle. |
||
| 29 | */ |
||
| 30 | public array $ext = ['png', 'jpg']; |
||
| 31 | |||
| 32 | /** |
||
| 33 | * @inheritdoc |
||
| 34 | */ |
||
| 35 | 20 | public function init() |
|
| 41 |