Conditions | 3 |
Paths | 4 |
Total Lines | 15 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 10 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
22 | 18 | public static function call($object, $method, $parameters, $anotherObject = null) |
|
23 | { |
||
24 | 18 | $method = \Doctrine\Common\Util\Inflector::camelize($method); |
|
25 | 18 | $result = $object; |
|
26 | |||
27 | 18 | if (is_null($anotherObject)) { |
|
28 | 12 | $anotherObject = $object; |
|
29 | 12 | } |
|
30 | |||
31 | 18 | if (method_exists($anotherObject, $method)) { |
|
32 | 18 | $result = call_user_func_array([ $anotherObject, $method ], $parameters); |
|
33 | 18 | } |
|
34 | |||
35 | 18 | return $result; |
|
36 | } |
||
37 | } |
||
38 |