Assertion   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 6
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A empty() 0 3 1
1
<?php declare(strict_types=1);
2
namespace Behapi\Assert;
3
4
use Assert as Beberlei;
5
6
/**
7
 * Adds an alias to `noContent`, so that a `not` switch can work on `empty`.
8
 *
9
 * To remove once https://github.com/beberlei/assert/pull/272 has been merged and released.
10
 *
11
 * @method static bool allEmpty(mixed $value, string|callable $message = null, string $propertyPath = null) Assert that value is empty for all values.
12
 * @method static bool nullOrEmpty(mixed $value, string|callable $message = null, string $propertyPath = null) Assert that value is empty or that the value is null.
13
 *
14
 * @link https://github.com/beberlei/assert/pull/272
15
 */
16
abstract class Assertion extends Beberlei\Assertion
17
{
18
    /** @return bool */
19
    public static function empty($value, $message = null, ?string $propertyPath = null): bool
20
    {
21
        return parent::noContent($value, $message, $propertyPath);
22
    }
23
}
24