Code Duplication    Length = 8-8 lines in 2 locations

src/ApaiIO/ResponseTransformer/ObjectToItems.php 1 location

@@ 123-130 (lines=8) @@
120
		}
121
	}
122
123
    protected function set_array($i, $data, $key1, $key2=NULL, $key3=NULL)
124
    {
125
        $this->set($i, $data, $key1, $key2, $key3);
126
        if(isset($this->data[$i][$data]) AND !is_array( $this->data[$i][$data]))
127
        {
128
            $this->data[$i][$data] = array($this->data[$i][$data]);
129
        }
130
    }
131
132
    private function get_price($i)
133
    {

src/ApaiIO/ResponseTransformer/ObjectToPreview.php 1 location

@@ 104-111 (lines=8) @@
101
		}
102
	}
103
104
    protected function set_array($i, $data, $key1, $key2=NULL, $key3=NULL)
105
    {
106
        $this->set($i, $data, $key1, $key2, $key3);
107
        if(isset($this->data[$i][$data]) AND !is_array( $this->data[$i][$data]))
108
        {
109
            $this->data[$i][$data] = array($this->data[$i][$data]);
110
        }
111
    }
112
113
    private function get_price($i)
114
    {