Passed
Push — master ( 71cd79...3a5308 )
by Vincent
02:53 queued 20s
created

SetExceptionsTrait::setInvalidArgumentException()   A

Complexity

Conditions 2
Paths 1

Size

Total Lines 12
Code Lines 10

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 10
c 2
b 0
f 0
dl 0
loc 12
rs 9.9332
cc 2
nc 1
nop 3
1
<?php
2
3
declare(strict_types=1);
4
5
namespace VGirol\JsonApiAssert;
6
7
use PHPUnit\Framework\AssertionFailedError;
8
use VGirol\JsonApiStructure\Testing\SetExceptionsTrait as TestingSetExceptionsTrait;
9
10
/**
11
 * Some helpers for testing
12
 *
13
 * @codeCoverageIgnore
14
 */
15
trait SetExceptionsTrait
16
{
17
    use TestingSetExceptionsTrait {
18
        setFailure as parentSetFailure;
19
    }
20
21
    /**
22
     * Undocumented function
23
     *
24
     * @param string|null $message
25
     * @param int|null    $code
26
     *
27
     * @return void
28
     */
29
    protected function setFailure(?string $message = null, $code = null): void
30
    {
31
        $this->parentSetFailure($message, $code, AssertionFailedError::class);
32
    }
33
}
34