| Conditions | 10 |
| Paths | 7 |
| Total Lines | 22 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
Small methods make your code easier to understand, in particular if combined with a good name. Besides, if your method is small, finding a good name is usually much easier.
For example, if you find yourself adding comments to a method's body, this is usually a good sign to extract the commented part to a new method, and use the comment as a starting point when coming up with a good name for this new method.
Commonly applied refactorings include:
If many parameters/temporary variables are present:
| 1 | <?php |
||
| 9 | public function hasVolOnEEList($uid, $eeListIndex) |
||
| 10 | { |
||
| 11 | $uid = urlencode($uid); |
||
| 12 | $uid = str_replace('.', '%2E', $uid); |
||
| 13 | if($eeListIndex === 1 || $eeListIndex === 0) |
||
| 14 | { |
||
| 15 | //Check earlier EE lists too |
||
| 16 | $val = $this->hasVolOnEEList($uid, $eeListIndex + 1); |
||
| 17 | if($val === true) |
||
| 18 | { |
||
| 19 | return true; |
||
| 20 | } |
||
| 21 | } |
||
| 22 | if(isset($this->dbData['eeLists']) && isset($this->dbData['eeLists'][$eeListIndex])) |
||
| 23 | { |
||
| 24 | $eeList = $this->dbData['eeLists'][$eeListIndex]; |
||
| 25 | if(isset($eeList[$uid]) && $eeList[$uid]['AAR'] === true && $eeList[$uid]['AF'] === true && $eeList[$uid]['Lead'] === true) |
||
| 26 | { |
||
| 27 | return true; |
||
| 28 | } |
||
| 29 | } |
||
| 30 | return false; |
||
| 31 | } |
||
| 84 |