OnlineDatabase   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
lcom 0
cbo 3
dl 0
loc 24
ccs 11
cts 11
cp 1
rs 10
c 1
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A newFingerprint() 0 8 1
A newItem() 0 7 1
A newItemId() 0 3 1
1
<?php
2
3
namespace Wikibase\DataFixtures\Items;
4
5
use Wikibase\DataModel\Entity\Item;
6
use Wikibase\DataModel\Entity\ItemId;
7
use Wikibase\DataModel\Term\Fingerprint;
8
9
/**
10
 * @since 1.1.0
11
 * @licence GNU GPL v2+
12
 * @author Jeroen De Dauw < [email protected] >
13
 */
14
class OnlineDatabase {
15
16 1
	public function newFingerprint() {
17 1
		$fingerprint = new Fingerprint();
18
19 1
		$fingerprint->setLabel( 'en', 'online database' );
20 1
		$fingerprint->setDescription( 'en', 'database accessible from a network, including from the Internet' );
21
22 1
		return $fingerprint;
23
	}
24
25 1
	public function newItem() {
26 1
		$item = new Item( $this->newItemId() );
27
28 1
		$item->setFingerprint( $this->newFingerprint() );
29
30 1
		return $item;
31
	}
32
33 1
	public function newItemId() {
34 1
		return new ItemId( 'Q7094076' );
35
	}
36
37
}
38