HashException::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 5
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
namespace Rostenkowski\Resize\Exceptions;
4
5
6
use Exception;
7
8
/**
9
 * Invalid hash exception
10
 */
11
class HashException extends Exception
12
{
13
14
	/**
15
	 * @param string $hash
16
	 */
17
	public function __construct($hash)
18
	{
19
		$message = sprintf('The image hash is invalid. It is required to be a SHA1 hash but %s given.', var_export($hash, TRUE));
20
21
		parent::__construct($message);
22
	}
23
24
}
25