Code Duplication    Length = 9-9 lines in 2 locations

src/Xhgui/Storage/File.php 2 locations

@@ 406-414 (lines=9) @@
403
     * @param $name
404
     * @return bool
405
     */
406
    public function addWatchedFunction($name)
407
    {
408
        $name = trim($name);
409
        if (empty($name)) {
410
            return false;
411
        }
412
        $id = md5($name);
413
        file_put_contents($this->watchedFunctionsPathPrefix.$id.'.json', json_encode(['id'=>$id, 'name'=>$name]));
414
    }
415
416
    /**
417
     * @param $id
@@ 421-429 (lines=9) @@
418
     * @param $name
419
     * @return bool
420
     */
421
    public function updateWatchedFunction($id, $name)
422
    {
423
        $name = trim($name);
424
        if (empty($name)) {
425
            return false;
426
        }
427
428
        file_put_contents($this->watchedFunctionsPathPrefix.$id.'.json', json_encode(['id'=>$id, 'name'=>trim($name)]));
429
    }
430
431
    /**
432
     * @param $id