Code Duplication    Length = 13-14 lines in 2 locations

class/field.php 1 location

@@ 32-45 (lines=14) @@
29
     * @param $fieldnumber
30
     * @param $config
31
     */
32
    public function __construct($fieldnumber, $config)
33
    {
34
        //find key where Id = $fieldnumber;
35
        $configCount = count($config);
36
        for ($x = 0; $x < $configCount; ++$x) {
37
            //@todo - figure out if this is suppose to be an assignment or just a compare ('=' or '==')
38
            if ($config[$x]['Id'] = $fieldnumber) {
39
                foreach ($config[$x] as $key => $value) {
40
                    $this->$key = $value;
41
                }
42
            }
43
        }
44
        $this->id = $fieldnumber;
45
    }
46
47
    /**
48
     * @return bool

include/class_field.php 1 location

@@ 92-104 (lines=13) @@
89
     * @param $fieldnumber
90
     * @param $config
91
     */
92
    public function __construct($fieldnumber, $config)
93
    {
94
        //find key where ID = $fieldnumber;
95
        $configCount = count($config);
96
        for ($x = 0; $x < $configCount; ++$x) {
97
            if ($config[$x]['Id'] = $fieldnumber) {
98
                foreach ($config[$x] as $key => $values) {
99
                    $this->$key = $values;
100
                }
101
            }
102
        }
103
        $this->id = $fieldnumber;
104
    }
105
106
    /**
107
     * @return bool