| Conditions | 3 |
| Paths | 2 |
| Total Lines | 7 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 12 |
| Changes | 0 | ||
| 1 | <?php |
||
| 51 | public function getMessageLocalized() { |
||
| 52 | $message = $this->getPlayerLocalization($this->getMessage()); |
||
| 53 | if (is_array($this->sprintf) && !empty($this->sprintf)) { |
||
| 54 | $message = call_user_func_array('sprintf', array_merge(array($message), $this->sprintf)); |
||
| 55 | } |
||
| 56 | |||
| 57 | return $message; |
||
| 58 | } |
||
| 61 |
Instead of relying on
globalstate, we recommend one of these alternatives:1. Pass all data via parameters
2. Create a class that maintains your state