Code Duplication    Length = 8-8 lines in 2 locations

src/Directory.php 2 locations

@@ 78-85 (lines=8) @@
75
	 *
76
	 * @return bool
77
	 */
78
	public function create(string $subdir = null):bool{
79
80
		if($subdir && $this->filereader->isDir($this->path)){
81
			return $this->filereader->makeDir($this->path.DIRECTORY_SEPARATOR.$subdir);
82
		}
83
84
		return $this->filereader->makeDir($this->path);
85
	}
86
87
	/**
88
	 * @param string|null $subdir
@@ 92-99 (lines=8) @@
89
	 *
90
	 * @return bool
91
	 */
92
	public function delete(string $subdir = null):bool{
93
94
		if($subdir && $this->filereader->isDir($this->path)){
95
			return $this->filereader->deleteDir($this->path.DIRECTORY_SEPARATOR.$subdir);
96
		}
97
98
		return $this->filereader->deleteDir($this->path);
99
	}
100
101
	/**
102
	 * @param string $newname