Disambiguate   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 10
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A validate() 0 3 1
1
<?php
2
declare(strict_types=1);
3
/*
4
 * citeproc-php
5
 *
6
 * @link        http://github.com/seboettg/citeproc-php for the source repository
7
 * @copyright   Copyright (c) 2016 Sebastian Böttger.
8
 * @license     https://opensource.org/licenses/MIT
9
 */
10
11
namespace Seboettg\CiteProc\Constraint;
12
13
use stdClass;
14
15
/**
16
 * Class Disambiguate
17
 * When set to “true” (the only allowed value), the element content is only rendered if it disambiguates two otherwise
18
 * identical citations. This attempt at disambiguation is only made when all other disambiguation methods have failed
19
 * to uniquely identify the target source.
20
 */
21
class Disambiguate implements Constraint
22
{
23
    /**
24
     * @param stdClass $data
25
     * @param int|null $citationNumber
26
     * @return bool
27
     */
28
    public function validate(stdClass $data, $citationNumber = null): bool
29
    {
30
        return false;
31
    }
32
}
33