Passed
Branch master (d3d7fc)
by Eugene
10:15 queued 04:37
created

PhpUnitCompat   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A expectExceptionMessageMatches() 0 9 2
1
<?php
2
3
/**
4
 * This file is part of the tarantool/queue package.
5
 *
6
 * (c) Eugene Leonovich <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
declare(strict_types=1);
13
14
namespace Tarantool\Queue\Tests;
15
16
/**
17
 * A compatibility layer for the legacy PHPUnit 7.
18
 */
19
trait PhpUnitCompat
20
{
21
    public function expectExceptionMessageMatches(string $regularExpression) : void
22
    {
23
        if (\is_callable('parent::expectExceptionMessageMatches')) {
24
            parent::expectExceptionMessageMatches($regularExpression);
25
26
            return;
27
        }
28
29
        parent::expectExceptionMessageRegExp($regularExpression);
30
    }
31
}
32