Total Complexity | 3 |
Total Lines | 37 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
20 | class RuleTransformFactory extends AbstractFactory |
||
21 | { |
||
22 | /** @var RuleApplier */ |
||
23 | protected $ruleApplier; |
||
24 | |||
25 | /** |
||
26 | * RuleTransformFactory constructor. |
||
27 | * |
||
28 | * @param string $operation |
||
29 | * @param string $class |
||
30 | * @param RuleApplier $ruleApplier |
||
31 | */ |
||
32 | public function __construct(string $operation, string $class, RuleApplier $ruleApplier) |
||
33 | { |
||
34 | parent::__construct($operation, $class); |
||
35 | $this->ruleApplier = $ruleApplier; |
||
36 | } |
||
37 | |||
38 | /** |
||
39 | * @inheritdoc |
||
40 | */ |
||
41 | public function build(string $operation, array $options): ChainOperationInterface |
||
42 | { |
||
43 | return $this->create($this->ruleApplier, $options['columns'], $options['add']); |
||
44 | } |
||
45 | |||
46 | /** |
||
47 | * @inheritdoc |
||
48 | */ |
||
49 | protected function configureValidator(): Constraint |
||
57 | ]); |
||
58 | } |
||
59 | } |