Code Duplication    Length = 9-9 lines in 2 locations

src/Eccube/Form/Type/AddCartType.php 2 locations

@@ 180-188 (lines=9) @@
177
            $context->validateValue($data['product_class_id'], array(
178
                new Assert\NotBlank(),
179
            ), '[product_class_id]');
180
            if ($this->Product->getClassName1()) {
181
                $context->validateValue($data['classcategory_id1'], array(
182
                    new Assert\NotBlank(),
183
                    new Assert\NotEqualTo(array(
184
                        'value' => '__unselected',
185
                        'message' => 'form.type.select.notselect'
186
                    )),
187
                ), '[classcategory_id1]');
188
            }
189
            //商品規格2初期状態(未選択)の場合の返却値は「NULL」で「__unselected」ではない
190
            if ($this->Product->getClassName2()) {
191
                $context->validateValue($data['classcategory_id2'], array(
@@ 190-198 (lines=9) @@
187
                ), '[classcategory_id1]');
188
            }
189
            //商品規格2初期状態(未選択)の場合の返却値は「NULL」で「__unselected」ではない
190
            if ($this->Product->getClassName2()) {
191
                $context->validateValue($data['classcategory_id2'], array(
192
                    new Assert\NotBlank(),
193
                    new Assert\NotEqualTo(array(
194
                        'value' => '__unselected',
195
                        'message' => 'form.type.select.notselect'
196
                    )),
197
                ), '[classcategory_id2]');
198
            }
199
200
        }
201
    }