Path::set()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Jonasdamher\Simplifyimage\Utils;
6
7
/**
8
 * For set path where the images will be saved.
9
 */
10
class Path
11
{
12
13
	private string $path = '';
14
15
	public function get(): string
16
	{
17
		return $this->path;
18
	}
19
20
	/**
21
	 * Specify the path where the images will be saved.
22
	 * @param string $path
23
	 * @example public/images/
24
	 */
25
	public function set(string $path)
26
	{
27
		$this->path = $path;
28
	}
29
30
	/**
31
	 * Verify if path exist.
32
	 * @return bool
33
	 */
34
	public function exist(): bool
35
	{
36
		return (is_dir($this->get()));
37
	}
38
}