Assert   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 4
c 1
b 0
f 0
dl 0
loc 9
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A that() 0 5 1
1
<?php declare(strict_types=1);
2
namespace Behapi\Assert;
3
4
use Assert as Beberlei;
5
6
/**
7
 * While the PR in links are not merged and released, let's use this assertion
8
 * class to satisfy our needs...
9
 *
10
 * @link https://github.com/beberlei/assert/pull/265
11
 * @link https://github.com/beberlei/assert/pull/272
12
 */
13
abstract class Assert extends Beberlei\Assert
14
{
15
    protected static $assertionClass = Assertion::class;
16
17
    public static function that($value, $defaultMessage = null, ?string $defaultPropertyPath = null): Beberlei\AssertionChain
18
    {
19
        $assertionChain = new AssertionChain($value, $defaultMessage, $defaultPropertyPath);
20
21
        return $assertionChain->setAssertionClassName(static::$assertionClass);
22
    }
23
}
24