Conditions | 1 |
Paths | 1 |
Total Lines | 15 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
Methods with many parameters are not only hard to understand, but their parameters also often become inconsistent when you need more, or different data.
There are several approaches to avoid long parameter lists:
1 | <?php |
||
19 | public function getMock($originalClassName, $methods = array(), array $arguments = array(), $mockClassName = '', $callOriginalConstructor = true, $callOriginalClone = true, $callAutoload = true, $cloneArguments = false, $callOriginalMethods = false, $proxyTarget = null) |
||
20 | { |
||
21 | return parent::getMock( |
||
22 | $originalClassName, |
||
23 | $methods, |
||
24 | $arguments, |
||
25 | $mockClassName, |
||
26 | $callOriginalConstructor, |
||
27 | $callOriginalClone, |
||
28 | $callAutoload, |
||
29 | $cloneArguments, |
||
30 | $callOriginalMethods, |
||
31 | $proxyTarget |
||
32 | ); |
||
33 | } |
||
34 | |||
54 |
This check marks calls to methods that do not seem to exist on an object.
This is most likely the result of a method being renamed without all references to it being renamed likewise.