Completed
Push — master ( 603fa9...c5e232 )
by Daniel
03:00
created

Arr   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 4
c 1
b 0
f 1
lcom 0
cbo 3
dl 0
loc 17
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __call() 0 14 4
1
<?php
2
namespace Narrowspark\Arr;
3
4
class Arr
5
{
6
    public function __call($name, $arguments)
7
    {
8
        $access     = new Access();
9
        $enumerator = new Enumerator();
10
        $transform  = new Transform();
11
12
        if (condition) {
13
            return call_user_func_array([$access, $name], $args);
0 ignored issues
show
Bug introduced by
The variable $args does not exist. Did you forget to declare it?

This check marks access to variables or properties that have not been declared yet. While PHP has no explicit notion of declaring a variable, accessing it before a value is assigned to it is most likely a bug.

Loading history...
14
        } else if (condition) {
15
            return call_user_func_array([$enumerator, $name], $args);
16
        } else if (condition) {
17
            return call_user_func_array([$transform, $name], $args);
18
        }
19
    }
20
}
21