Assert::that()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 2
c 1
b 0
f 0
dl 0
loc 5
rs 10
cc 1
nc 1
nop 3
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