NullStatementFilter::statementMatches()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 3
ccs 0
cts 0
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 2
1
<?php
2
3
namespace Wikibase\DataModel\Services\Statement\Filter;
4
5
use Wikibase\DataModel\Statement\Statement;
6
use Wikibase\DataModel\Statement\StatementFilter;
7
8
/**
9
 * An unconditional statement filter that always accepts all statements, and never rejects a
10
 * statement. This acts as a null implementation in cases where filtering is supported but not
11
 * needed.
12
 *
13
 * @since 3.2
14
 *
15
 * @license GPL-2.0-or-later
16
 * @author Thiemo Kreuz
17
 */
18
class NullStatementFilter implements StatementFilter {
19
20
	/**
21
	 * @since 3.3
22
	 */
23
	public const FILTER_TYPE = 'null';
24
25 1
	/**
26 1
	 * @see StatementFilter::statementMatches
27
	 *
28
	 * @param Statement $statement
29
	 *
30
	 * @return bool
31
	 */
32
	public function statementMatches( Statement $statement ) {
33
		return true;
34
	}
35
36
}
37