| Total Complexity | 3 |
| Total Lines | 46 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 22 | class SkipScriptsByPath implements ValidatorInterface |
||
| 23 | { |
||
| 24 | /** |
||
| 25 | * @var Config |
||
| 26 | */ |
||
| 27 | private $config; |
||
| 28 | |||
| 29 | /** |
||
| 30 | * @var RequestHttp |
||
| 31 | */ |
||
| 32 | private $request; |
||
| 33 | |||
| 34 | /** |
||
| 35 | * SkipScriptsByController constructor. |
||
| 36 | * |
||
| 37 | * @param Config $config |
||
| 38 | * @param RequestHttp $request |
||
| 39 | */ |
||
| 40 | public function __construct( |
||
| 41 | Config $config, |
||
| 42 | RequestHttp $request |
||
| 43 | ) { |
||
| 44 | $this->config = $config; |
||
| 45 | $this->request = $request; |
||
| 46 | } |
||
| 47 | |||
| 48 | /** |
||
| 49 | * Validator function, handle javascript or not |
||
| 50 | * |
||
| 51 | * @param string $script |
||
| 52 | * @param Http $http |
||
| 53 | * |
||
| 54 | * @return bool |
||
| 55 | */ |
||
| 56 | public function validate(string $script, Http $http): bool |
||
| 68 | } |
||
| 69 | } |
||
| 70 |