| Conditions | 2 |
| Paths | 2 |
| Total Lines | 6 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 20 | static function toKeys($array1, $array2 = []) { |
||
|
|
|||
| 21 | if (empty($array2)) { |
||
| 22 | $array2 = [Application::app()->controller->getData('keywords')]; |
||
| 23 | } |
||
| 24 | return strLower(str_replace([',...', '...'], '', strTruncate(implode(', ', array_filter(array_merge($array1, $array2))), static::MAX_LENGTH))); |
||
| 25 | } |
||
| 26 | |||
| 28 |
Adding explicit visibility (
private,protected, orpublic) is generally recommend to communicate to other developers how, and from where this method is intended to be used.