Code Duplication    Length = 11-13 lines in 2 locations

src/Hyphenator.php 2 locations

@@ 442-452 (lines=11) @@
439
     * @throws PathNotDirException
440
     * @return void
441
     */
442
    public static function setDefaultHomePath($homePath)
443
    {
444
        if (! file_exists($homePath)) {
445
            throw new PathNotFoundException($homePath . ' does not exist');
446
        }
447
        if (! is_Dir($homePath)) {
448
            throw new PathNotDirException($homePath . ' is not a directory');
449
        }
450
451
        self::$defaultHomePath = realpath($homePath);
452
    }
453
454
    /**
455
     * Get the default Home-Path
@@ 485-497 (lines=13) @@
482
     * @throws PathNotDirException
483
     * @return Hyphenator
484
     */
485
    public function setHomePath($homePath)
486
    {
487
        if (! file_exists($homePath)) {
488
            throw new PathNotFoundException($homePath . ' does not exist');
489
        }
490
        if (! is_Dir($homePath)) {
491
            throw new PathNotDirException($homePath . ' is not a directory');
492
        }
493
494
        $this->homePath = realpath($homePath);
495
496
        return $this;
497
    }
498
499
    /**
500
     * Get this instances Home-Path.