Completed
Pull Request — master (#44)
by Alberto
02:53
created

isPropertyName.php ➔ isPropertyName()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 5
nc 1
nop 1
dl 0
loc 8
ccs 4
cts 4
cp 1
crap 1
rs 9.4285
c 0
b 0
f 0
1
<?php
2
declare(strict_types=1);
3
4
namespace Moka\Stub\Helper;
5
6
use Moka\Exception\InvalidArgumentException;
7
8
/**
9
 * @param string $name
10
 * @return bool
11
 *
12
 * @throws InvalidArgumentException
13
 */
14
function isPropertyName(string $name): bool
15
{
16 91
    return isName(
17 91
        $name,
18 91
        'property',
19 91
        stripName($name, ['static'])
20
    );
21
}