Code Duplication    Length = 12-12 lines in 2 locations

src/Bitcoin/BIP32Path.php 2 locations

@@ 168-179 (lines=12) @@
165
     *
166
     * @return BIP32Path
167
     */
168
    public function publicPath() {
169
        $path = $this->path;
170
171
        if ($path[0] === "M") {
172
            return new static($path);
173
        } else {
174
            $path[0] = "M";
175
176
            return new static($path);
177
        }
178
    }
179
180
    /**
181
     * change the path to be for the private key (starting with m/) and return the new path
182
     *
@@ 185-196 (lines=12) @@
182
     *
183
     * @return BIP32Path
184
     */
185
    public function privatePath() {
186
        $path = $this->path;
187
188
        if ($path[0] === "m") {
189
            return new static($path);
190
        } else {
191
            $path[0] = "m";
192
193
            return new static($path);
194
        }
195
    }
196
197
    /**
198
     * get the string representation of the path
199
     *