Passed
Push — master ( 385bba...6d8379 )
by Wilmer
04:18 queued 17s
created

LikeConditionBuilder::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Yiisoft\Db\Mssql\Builder;
6
7
/**
8
 * Builds conditions for {@see `\Yiisoft\Db\QueryBuilder\Condition\LikeCondition`} LIKE operator for MSSQL Server.
9
 */
10
final class LikeConditionBuilder extends \Yiisoft\Db\QueryBuilder\Condition\Builder\LikeConditionBuilder
11
{
12
    /**
13
     * @var array map of chars to their replacements in LIKE conditions. By default, it's configured to escape
14
     * `%`, `_`, `[` with `]`, `\\`.
15
     */
16
    protected array $escapingReplacements = [
17
        '%' => '[%]',
18
        '_' => '[_]',
19
        '[' => '[[]',
20
        ']' => '[]]',
21
        '\\' => '[\\]',
22
    ];
23
}
24