7
7
*
8
8
* http://dev.mysql.com/doc/refman/5.7/en/string-functions.html
9
9
*/
10
- trait StringFn
10
+ trait StringFunctions
11
11
{
12
12
13
13
/**
14
- * Concat - Return a concatinated string of all function arguments provided
15
- * @return string $str concatinated string
14
+ * Concat - Return a concatenated string of all function arguments provided
15
+ * @return string $str concatenated string
16
16
*/
17
17
public static function mysql_concat ()
18
18
{
@@ -24,9 +24,9 @@ public static function mysql_concat()
24
24
}
25
25
26
26
/**
27
- * Concat_ws - Return a concatinated string of all function arguments provided
28
- * it will use the first argument as the seperator
29
- * @return string $str concactinated string with seperator
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
30
*/
31
31
public static function mysql_concat_ws ()
32
32
{
@@ -38,7 +38,7 @@ public static function mysql_concat_ws()
38
38
39
39
40
40
/**
41
- * Format - Return a formated number string based on the arguements provided
41
+ * Format - Return a formated number string based on the arguments provided
42
42
* Ignoring the functionality of a third argument, locale
43
43
* https://dev.mysql.com/doc/refman/8.0/en/string-functions.html#function_format
44
44
* @return string $str formatted as per arg
@@ -47,7 +47,7 @@ public static function mysql_format()
47
47
{
48
48
$ args = func_get_args ();
49
49
$ number = isset ($ args [0 ]) ? $ args [0 ] : 0.0 ;
50
- $ decimals = isset ($ args [0 ]) ? $ args [0 ] : 0 ;
50
+ $ decimals = isset ($ args [1 ]) ? $ args [1 ] : 0 ;
51
51
return number_format ($ number , $ decimals );
52
52
}
53
53
}
0 commit comments