File tree 3 files changed +15
-1
lines changed
src/Vectorface/MySQLite/MySQL
tests/Vectorface/Tests/MySQLite
3 files changed +15
-1
lines changed Original file line number Diff line number Diff line change 20
20
"source" : " https://github.com/Vectorface/MySQLite"
21
21
},
22
22
"require" : {
23
- "php" : " ^8.0.0"
23
+ "php" : " ^8.0.0" ,
24
+ "ext-pdo" : " *"
24
25
},
25
26
"require-dev" : {
26
27
"phpunit/phpunit" : " ^9" ,
Original file line number Diff line number Diff line change @@ -50,4 +50,12 @@ public static function mysql_format()
50
50
$ decimals = isset ($ args [1 ]) ? $ args [1 ] : 0 ;
51
51
return number_format ($ number , $ decimals );
52
52
}
53
+
54
+ /**
55
+ * Get the soundex value of a given string
56
+ */
57
+ public static function mysql_soundex (string $ str ): string
58
+ {
59
+ return soundex ($ str );
60
+ }
53
61
}
Original file line number Diff line number Diff line change @@ -169,4 +169,9 @@ public function testFormat()
169
169
$ test = MySQLite::mysql_format ("12.232 " , 1 );
170
170
$ this ->assertEquals ($ expected , $ test );
171
171
}
172
+
173
+ public function testSoundex ()
174
+ {
175
+ $ this ->assertEquals ("F000 " , MySQLite::mysql_soundex ("foo " ));
176
+ }
172
177
}
You can’t perform that action at this time.
0 commit comments