Code Duplication    Length = 8-9 lines in 2 locations

src/Call/Trades/TradesResponse.php 1 location

@@ 24-32 (lines=9) @@
21
     */
22
    public function manualMapping($result)
23
    {
24
        foreach ($result as $txId => $trade) {
25
            if (!isset($trade["closing"])) {
26
                $trade["closing"] = null;
27
            }
28
            
29
            $this->trades[] = new TradeModel($trade["ordertxid"], $trade["pair"], $trade["time"], $trade["type"],
30
                $trade["ordertype"], $trade["price"], $trade["cost"], $trade["fee"], $trade["vol"], $trade["margin"],
31
                $trade["misc"], $trade["closing"]);
32
        }
33
    }
34
35
    /**

src/Call/TradesHistory/TradesHistoryResponse.php 1 location

@@ 30-37 (lines=8) @@
27
    public function manualMapping($result)
28
    {
29
        $this->count = $result["count"];
30
        foreach ($result["trades"] as $trade) {
31
            if (!isset($trade["closing"])) {
32
                $trade["closing"] = null;
33
            }
34
            $this->trades[] = new TradeModel($trade["ordertxid"], $trade["pair"], $trade["time"], $trade["type"],
35
                $trade["ordertype"], $trade["price"], $trade["cost"], $trade["fee"], $trade["vol"], $trade["margin"],
36
                $trade["misc"], $trade["closing"]);
37
        }
38
    }
39
40
    /**