ArgumentCallback::assert()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 2
c 1
b 0
f 0
dl 0
loc 4
ccs 0
cts 0
cp 0
rs 10
cc 1
nc 1
nop 2
crap 2
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Chubbyphp\Mock\Argument;
6
7
class ArgumentCallback implements ArgumentInterface
8
{
9
    /**
10
     * @var callable
11
     */
12
    private $callback;
13
14
    public function __construct(callable $callback)
15
    {
16
        $this->callback = $callback;
17 1
    }
18
19 1
    /**
20 1
     * @param mixed $argument
21
     */
22
    public function assert($argument, array $context)
23
    {
24
        $callback = $this->callback;
25
        $callback($argument, $context);
26 1
    }
27
}
28