Code Duplication    Length = 3-3 lines in 2 locations

src/Command/CommandNewPage.php 1 location

@@ 52-54 (lines=3) @@
49
50
        try {
51
            // file name (without extension)
52
            if (false !== $extPos = strripos($this->name, '.md')) {
53
                $this->name = substr($this->name, 0, $extPos);
54
            }
55
            // path
56
            $fileRelativePath = $this->getBuilder($output)->getConfig()->get('content.dir') . '/' . $this->name . '.md';
57
            $filePath = $this->getPath() . '/' . $fileRelativePath;

src/Command/NewPage.php 1 location

@@ 42-44 (lines=3) @@
39
40
        try {
41
            // file name (without extension)
42
            if (false !== $extPos = strripos($this->name, '.md')) {
43
                $this->name = substr($this->name, 0, $extPos);
44
            }
45
            // path
46
            $fileRelativePath = $this->getBuilder()->getConfig()->get('content.dir').'/'.$this->name.'.md';
47
            $filePath = $this->getPath().'/'.$fileRelativePath;