Skip to content

Commit 6f73ef6

Browse files
committed
String functions: cleanup!
1 parent e7b5981 commit 6f73ef6

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

src/Vectorface/MySQLite/MySQL/StringFn.php src/Vectorface/MySQLite/MySQL/StringFunctions.php

+8-8
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77
*
88
* http://dev.mysql.com/doc/refman/5.7/en/string-functions.html
99
*/
10-
trait StringFn
10+
trait StringFunctions
1111
{
1212

1313
/**
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
1616
*/
1717
public static function mysql_concat()
1818
{
@@ -24,9 +24,9 @@ public static function mysql_concat()
2424
}
2525

2626
/**
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
3030
*/
3131
public static function mysql_concat_ws()
3232
{
@@ -38,7 +38,7 @@ public static function mysql_concat_ws()
3838

3939

4040
/**
41-
* Format - Return a formated number string based on the arguements provided
41+
* Format - Return a formated number string based on the arguments provided
4242
* Ignoring the functionality of a third argument, locale
4343
* https://dev.mysql.com/doc/refman/8.0/en/string-functions.html#function_format
4444
* @return string $str formatted as per arg
@@ -47,7 +47,7 @@ public static function mysql_format()
4747
{
4848
$args = func_get_args();
4949
$number = isset($args[0]) ? $args[0] : 0.0;
50-
$decimals = isset($args[0]) ? $args[0] : 0;
50+
$decimals = isset($args[1]) ? $args[1] : 0;
5151
return number_format($number, $decimals);
5252
}
5353
}

src/Vectorface/MySQLite/MySQLite.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
use Vectorface\MySQLite\MySQL\DateTime;
1313
use Vectorface\MySQLite\MySQL\Flow;
1414
use Vectorface\MySQLite\MySQL\Numeric;
15-
use Vectorface\MySQLite\MySQL\StringFn;
15+
use Vectorface\MySQLite\MySQL\StringFunctions;
1616

1717
/**
1818
* Provides some compatibility functions, allowing SQLite to mimic some MySQL functions.
@@ -29,7 +29,7 @@ class MySQLite
2929
use DateTime;
3030
use Flow;
3131
use Numeric;
32-
use StringFn;
32+
use StringFunctions;
3333

3434
/**
3535
* Get a list of MySQL compatibility functions currently provided by this class.

0 commit comments

Comments
 (0)