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

HashableObject   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
lcom 1
cbo 0
dl 0
loc 13
c 1
b 0
f 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A getHash() 0 3 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