NullStatementGrouper   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 2
c 1
b 0
f 0
dl 0
loc 10
ccs 2
cts 2
cp 1
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A groupStatements() 0 2 1
1
<?php
2
3
namespace Wikibase\DataModel\Services\Statement\Grouper;
4
5
use Wikibase\DataModel\Statement\StatementList;
6
7
/**
8
 * An unconditional statement grouper that always returns a single group, containing the original,
9
 * unmodified list of statements, and nothing else.
10
 *
11
 * @since 3.2
12
 *
13
 * @license GPL-2.0-or-later
14
 * @author Thiemo Kreuz
15
 */
16
class NullStatementGrouper implements StatementGrouper {
17
18
	/**
19
	 * @param StatementList $statements
20
	 *
21 1
	 * @return StatementList[] An associative array, mapping the default group identifier
22 1
	 *  "statements" to the unmodified StatementList object.
23
	 */
24
	public function groupStatements( StatementList $statements ) {
25
		return [ 'statements' => $statements ];
26
	}
27
28
}
29