Completed
Pull Request — master (#38)
by Alberto
01:55
created

MethodStub::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 2
dl 0
loc 6
ccs 3
cts 3
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;
5
6
use Moka\Exception\InvalidArgumentException;
7
8
/**
9
 * Class MethodStub
10
 * @package Moka\Stub
11
 */
12
class MethodStub extends AbstractStub
13
{
14
    /**
15
     * MethodStub constructor.
16
     * @param string $name
17
     * @param mixed $value
18
     *
19
     * @throws InvalidArgumentException
20
     */
21 112
    public function __construct(string $name, $value)
22
    {
23 112
        StubHelper::validateMethodName($name);
24
25 110
        parent::__construct($name, $value);
26
    }
27
}
28