| Total Complexity | 5 |
| Total Lines | 34 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 10 | class VersionConfigComponent implements \Vaimo\ComposerPatches\Interfaces\DefinitionExploderComponentInterface |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * @var \Vaimo\ComposerPatches\Patch\Definition\Value\Analyser |
||
| 14 | */ |
||
| 15 | private $valueAnalyser; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @var \Vaimo\ComposerPatches\Patch\Definition\Constraint\Exploder |
||
| 19 | */ |
||
| 20 | private $definitionExploder; |
||
| 21 | |||
| 22 | public function __construct() |
||
| 26 | } |
||
| 27 | |||
| 28 | public function shouldProcess($label, $data) |
||
| 29 | { |
||
| 30 | if (!is_array($data)) { |
||
| 31 | return false; |
||
| 32 | } |
||
| 33 | |||
| 34 | $key = key($data); |
||
| 35 | $value = reset($data); |
||
| 36 | |||
| 37 | return !isset($value[PatchDefinition::VERSION], $value[PatchDefinition::DEPENDS]) && |
||
| 38 | $this->valueAnalyser->isConstraint($key); |
||
| 39 | } |
||
| 40 | |||
| 41 | public function explode($label, $data) |
||
| 44 | } |
||
| 45 | } |
||
| 46 |