Code Duplication    Length = 8-9 lines in 3 locations

src/Services/BlocktrailBatchUnspentOutputFinder.php 1 location

@@ 93-101 (lines=9) @@
90
        } while ($more);
91
92
        //reduce the returned data into the values we're interested in
93
        $result = array_map(function ($utxo) {
94
            return array(
95
                'hash'       => $utxo['hash'],
96
                'index'      => $utxo['index'],
97
                'value'      => $utxo['value'],
98
                'address'    => $utxo['address'],
99
                'script_hex' => $utxo['script_hex'],
100
            );
101
        }, $utxos);
102
103
        return $result;
104
    }

src/Services/BlocktrailUnspentOutputFinder.php 1 location

@@ 92-99 (lines=8) @@
89
        $this->retries = 0;
90
91
        //reduce the returned data into the values we're interested in
92
        $result = array_map(function ($utxo) {
93
            return array(
94
                'hash'       => $utxo['hash'],
95
                'index'      => $utxo['index'],
96
                'value'      => $utxo['value'],
97
                'script_hex' => $utxo['script_hex'],
98
            );
99
        }, $utxos);
100
101
        return $result;
102
    }

src/Services/InsightUnspentOutputFinder.php 1 location

@@ 86-94 (lines=9) @@
83
        } while ($more);
84
85
        //reduce the returned data into the values we're interested in
86
        $result = array_map(function ($utxo) {
87
            return array(
88
                'hash'       => $utxo['txid'],
89
                'index'      => $utxo['vout'],
90
                'value'      => BlocktrailSDK::toSatoshi($utxo['amount']),
91
                'address'    => $utxo['address'],
92
                'script_hex' => $utxo['scriptPubKey'],
93
            );
94
        }, $utxos);
95
96
        return $result;
97
    }