CaseIgnoreMatch   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
eloc 3
dl 0
loc 11
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
1
<?php
2
3
declare(strict_types = 1);
4
5
namespace Sop\X501\MatchingRule;
6
7
use Sop\X501\StringPrep\StringPreparer;
8
9
/**
10
 * Implements 'caseIgnoreMatch' matching rule.
11
 *
12
 * @see https://tools.ietf.org/html/rfc4517#section-4.2.11
13
 */
14
class CaseIgnoreMatch extends StringPrepMatchingRule
15
{
16
    /**
17
     * Constructor.
18
     *
19
     * @param int $string_type ASN.1 string type tag
20
     */
21 26
    public function __construct(int $string_type)
22
    {
23 26
        parent::__construct(
24 26
            StringPreparer::forStringType($string_type)->withCaseFolding(true));
25 26
    }
26
}
27