CaseIgnoreMatch::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 4
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 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