Code Duplication    Length = 11-12 lines in 2 locations

framework/Koch/Form/Form.php 2 locations

@@ 1467-1478 (lines=12) @@
1464
        // level 1
1465
        foreach ($attributes as $decorator_type => $decoratorname_array) {
1466
            // apply settings for the form itself
1467
            if ($decorator_type === 'form') {
1468
                // level 2
1469
                foreach ($decoratorname_array as $decoratorname => $attribute_and_value) {
1470
                    $decorator = $this->getDecorator($decoratorname);
1471
                    #\Koch\Debug::printR($attribute_and_value);
1472
                    // level 3
1473
                    foreach ($attribute_and_value as $attribute => $value) {
1474
                        $decorator->$attribute = $value;
1475
                    }
1476
                    #\Koch\Debug::printR($decorator);
1477
                }
1478
            }
1479
1480
            // apply settings to a formelement of the form
1481
            if ($decorator_type === 'formelement') {
@@ 1481-1491 (lines=11) @@
1478
            }
1479
1480
            // apply settings to a formelement of the form
1481
            if ($decorator_type === 'formelement') {
1482
                // level 2
1483
                foreach ($decoratorname_array as $decoratorname => $attribute_and_value) {
1484
                    $decorator = $this->getFormelementDecorator($decoratorname);
1485
                    #\Koch\Debug::printR($attribute_and_value);
1486
                    // level 3
1487
                    foreach ($attribute_and_value as $attribute => $value) {
1488
                        $decorator->$attribute = $value;
1489
                    }
1490
                }
1491
            }
1492
        }
1493
1494
        unset($attributes, $this->decoratorAttributes);