Passed
Branch master (e714e6)
by Gabriel
13:58 queued 11:36
created

MethodsCollection::run()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 2
dl 0
loc 4
ccs 3
cts 3
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Nip\View\Methods;
4
5
use Nip\Collections\AbstractCollection;
6
7
/**
8
 * Class MethodsCollection
9
 * @package Nip\View\Methods
10
 */
11
class MethodsCollection extends AbstractCollection
12
{
13
    /**
14
     * @param $method
15
     * @param $args
16
     * @return mixed
17
     */
18 2
    public function run($method, $args)
19
    {
20 2
        $methodClosure = $this->get($method);
21 2
        return $methodClosure(...$args);
22
    }
23
}
24