Passed
Push — master ( ff0b4a...b3e34b )
by Alec
03:32
created

getValue()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 1
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 2
dl 0
loc 4
ccs 1
cts 1
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php declare(strict_types=1);
2
3
namespace AlecRabbit\Helpers;
4
5
use AlecRabbit\Helpers\Objects\Picklock;
6
7
if (!function_exists(__NAMESPACE__ . '\callMethod')) {
8
    /**
9
     * Calls method $methodName of object $object using arguments ...$args.
10
     *
11
     * @param object $object
12
     * @param string $methodName
13
     * @param mixed ...$args
14
     * @return mixed
15
     */
16
    function callMethod(object $object, string $methodName, ...$args)
17
    {
18
        return
19 1
            Picklock::callMethod($object, $methodName, ...$args);
20
    }
21
}
22
23
if (!function_exists(__NAMESPACE__ . '\getValue')) {
24
    /**
25
     * @param object $object
26
     * @param string $propName
27
     * @return mixed
28
     */
29
    function getValue(object $object, string $propName)
30
    {
31
        return
32 1
            Picklock::getValue($object, $propName);
33
    }
34
}
35