Passed
Push — main ( 8285d8...9556f0 )
by José
03:31
created

Helper::isEmptyOrNull()   A

Complexity

Conditions 3
Paths 3

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 3

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 3
eloc 1
nc 3
nop 1
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 3
rs 10
c 1
b 0
f 0
1
<?php
2
namespace CrudSys\OAuth2\Client\Helper;
3
4
class Helper
5
{
6
    /**
7
     * isEmptyOrNull
8
     * Verify is a string is Empty or Null
9
     *
10
     * @param [mixed] $value
0 ignored issues
show
Documentation Bug introduced by
The doc comment [mixed] at position 0 could not be parsed: Unknown type name '[' at position 0 in [mixed].
Loading history...
11
     * @return boolean
12
     */
13 9
    public static function isEmptyOrNull($value): bool
14
    {
15 9
        return is_null($value) || empty($value) || '' === $value;
16
    }
17
}
18