Passed
Push — arrayWrap ( bb008b...7a5a21 )
by no
05:31 queued 02:49
created

HashableObject::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %
Metric Value
dl 0
loc 3
rs 10
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
namespace Wikibase\DataModel\Fixtures;
4
5
use Hashable;
6
7
/**
8
 * @licence GNU GPL v2+
9
 * @author Jeroen De Dauw < [email protected] >
10
 */
11
class HashableObject implements Hashable {
12
13
	protected $var;
14
15
	public function __construct( $var ) {
16
		$this->var = $var;
17
	}
18
19
	public function getHash() {
20
		return sha1( $this->var );
21
	}
22
23
}
24