Path   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 27
rs 10
c 0
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A exist() 0 3 1
A set() 0 3 1
A get() 0 3 1
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
}