Passed
Push — master ( 0cee60...124be7 )
by Pauli
14:22
created

FileExistsException::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 2
dl 0
loc 3
rs 10
1
<?php declare(strict_types=1);
2
3
/**
4
 * ownCloud - Music app
5
 *
6
 * This file is licensed under the Affero General Public License version 3 or
7
 * later. See the COPYING file.
8
 *
9
 * @author Pauli Järvinen <[email protected]>
10
 * @copyright Pauli Järvinen 2025
11
 */
12
13
namespace OCA\Music\AppFramework\Utility;
14
15
class FileExistsException extends \RuntimeException {
16
17
	private $path;
18
	private $altName;
19
20
	public function __construct(string $path, string $altName) {
21
		$this->path = $path;
22
		$this->altName = $altName;
23
	}
24
25
	/**
26
	 * Get conflicting file path
27
	 */
28
	public function getPath() {
29
		return $this->path;
30
	}
31
32
	/**
33
	 * Get suggested alternative file name to avoid the conflict
34
	 */
35
	public function getAltName() {
36
		return $this->altName;
37
	}
38
}
39