EmptyImage::getHeight()   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 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Rostenkowski\Resize\Entity;
4
5
6
use Nette\Utils\Image;
7
use Rostenkowski\Resize\Meta;
8
9
/**
10
 * "Image not found" entity
11
 */
12
class EmptyImage implements Meta
13
{
14
15
	public function getHash()
16
	{
17
		return '_empty';
18
	}
19
20
21
	public function getType()
22
	{
23
		return Image::PNG;
24
	}
25
26
27
	public function setHash($hash)
28
	{
29
		throw new \LogicException('Unavailable image hash cannot be changed.');
30
	}
31
32
33
	public function setType($type)
34
	{
35
		throw new \LogicException('Unavailable image hash cannot be changed.');
36
	}
37
38
39
	public function getHeight()
40
	{
41
		return 1080;
42
	}
43
44
45
	public function getWidth()
46
	{
47
		return 1920;
48
	}
49
50
}
51