TestCaseVersion7   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
c 1
b 0
f 0
lcom 0
cbo 3
dl 0
loc 17
ccs 0
cts 7
cp 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A expectExceptionCode() 0 8 3
1
<?php
2
/**
3
 * Common tests stuff
4
 *
5
 * @see       https://github.com/sergeymakinen/tests
6
 * @copyright Copyright (c) 2017-2018 Sergey Makinen (https://makinen.ru)
7
 * @license   https://github.com/sergeymakinen/tests/blob/master/LICENSE MIT License
8
 */
9
10
namespace SergeyMakinen\Tests;
11
12
use SergeyMakinen\Tests\Util\ExtensionTrait;
13
14
abstract class TestCaseVersion7 extends \PHPUnit\Framework\TestCase
15
{
16
    use ExtensionTrait;
17
18
    /**
19
     * @param int|string $code
20
     * @throws \Exception
21
     */
22
    public function expectExceptionCode($code): void
23
    {
24
        if (!is_int($code) && !is_string($code)) {
25
            throw \PHPUnit\Util\InvalidArgumentHelper::factory(1, 'integer or string');
26
        }
27
28
        parent::expectExceptionCode($code);
29
    }
30
}
31