| Total Complexity | 6 |
| Total Lines | 42 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 10 | trait StringFunctions |
||
| 11 | { |
||
| 12 | |||
| 13 | /** |
||
| 14 | * Concat - Return a concatenated string of all function arguments provided |
||
| 15 | * @return string $str concatenated string |
||
| 16 | */ |
||
| 17 | public static function mysql_concat() |
||
| 18 | { |
||
| 19 | $str = ''; |
||
| 20 | foreach (func_get_args() as $arg) { |
||
| 21 | $str .= $arg; |
||
| 22 | } |
||
| 23 | return $str; |
||
| 24 | } |
||
| 25 | |||
| 26 | /** |
||
| 27 | * Concat_ws - Return a concatenated string of all function arguments provided |
||
| 28 | * it will use the first argument as the separator |
||
| 29 | * @return string $str concatenated string with separator |
||
| 30 | */ |
||
| 31 | public static function mysql_concat_ws() |
||
| 37 | } |
||
| 38 | |||
| 39 | |||
| 40 | /** |
||
| 41 | * Format - Return a formated number string based on the arguments provided |
||
| 42 | * Ignoring the functionality of a third argument, locale |
||
| 43 | * https://dev.mysql.com/doc/refman/8.0/en/string-functions.html#function_format |
||
| 44 | * @return string $str formatted as per arg |
||
| 45 | */ |
||
| 46 | public static function mysql_format() |
||
| 54 |