MethodCallManager   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 0 Features 2
Metric Value
wmc 2
c 2
b 0
f 2
lcom 0
cbo 0
dl 0
loc 15
ccs 4
cts 4
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A assertArgsNumber() 0 6 2
1
<?php
2
3
namespace Accessible\MethodManager;
4
5
class MethodCallManager
6
{
7
    /**
8
     * Throws a BadMethodCallException if the number of arguments is not what we want.
9
     *
10
     * @param  int $numberOfArgs
11
     * @param  array $args
12
     */
13 33
    public static function assertArgsNumber($numberOfArgs, $args)
14
    {
15 33
        if (sizeof($args) !== $numberOfArgs) {
16 3
            throw new \BadMethodCallException("A wrong number of arguments has been given to the called method.");
17
        }
18 30
    }
19
}
20