| 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 $this->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 method has been deprecated. The supplier of the class has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the method will be removed from the class and what other method or class to use instead.