Code Duplication    Length = 6-8 lines in 2 locations

src/Validator/DecisionTableValidator.php 2 locations

@@ 108-113 (lines=6) @@
105
    {
106
        if (empty($this->builder->getHitPolicy()) === true) {
107
            $this->errors[] = 'hit policy of decision table is required';
108
        } else if (in_array($this->builder->getHitPolicy(), HitPolicy::ALLOWED_HIT_POLICIES) === false) {
109
            $this->errors[] = sprintf(
110
                'hit policy of decision table must be one of: %s',
111
                implode(', ', HitPolicy::ALLOWED_HIT_POLICIES)
112
            );
113
        }
114
115
        if (HitPolicy::COLLECT_POLICY === $this->builder->getHitPolicy() &&
116
            empty($this->builder->getCollectOperator()) === true)
@@ 119-126 (lines=8) @@
116
            empty($this->builder->getCollectOperator()) === true)
117
        {
118
            $this->errors[] = 'hit policy COLLECT requires a collect operator.';
119
        } else if (HitPolicy::COLLECT_POLICY === $this->builder->getHitPolicy() &&
120
            in_array($this->builder->getCollectOperator(), CollectOperator::ALLOWED_COLLECT_OPERATORS) === false)
121
        {
122
            $this->errors[] = sprintf(
123
                'collect operator must be one of: %s',
124
                implode(', ', CollectOperator::ALLOWED_COLLECT_OPERATORS)
125
            );
126
        }
127
    }
128
129
    /**