Skip to content

Commit 2e35a68

Browse files
committed
fix phpstan
1 parent 02461d1 commit 2e35a68

3 files changed

Lines changed: 10 additions & 14 deletions

File tree

src/LCS.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,6 @@ public function value()
7171
* Edit distance when only insertion and deletion is allowed (no
7272
* substitution)
7373
* = strlen(str1) + strlen(str2) - 2 * length(LCS(str1, str2))
74-
* @param type $string1
75-
* @param type $string2
7674
*/
7775
public function distance()
7876
{

src/StringDistance.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ class StringDistance
1111
* and best suited for short strings such as person names. The score is
1212
* normalized such that 0 equates to no similarity and 1 is an exact match.
1313
*
14-
* @param type $string1
15-
* @param type $string2
16-
* @return int
14+
* @param string $string1
15+
* @param string $string2
16+
* @return float
1717
*/
1818
public static function Jaro($string1, $string2)
1919
{
@@ -96,9 +96,9 @@ protected static function getPrefixLength($string1, $string2, $MINPREFIXLENGTH =
9696
* Returns the minimum number of single-character edits
9797
* (i.e. insertions, deletions or substitutions) required to change one
9898
* word into the other
99-
* @param type $string1
100-
* @param type $string2
101-
* @return type
99+
* @param string $string1
100+
* @param string $string2
101+
* @return int
102102
*/
103103
public static function Levenshtein($string1, $string2)
104104
{
@@ -107,9 +107,9 @@ public static function Levenshtein($string1, $string2)
107107

108108
/**
109109
* Levenshtein($string1, $string2)
110-
* @param type $string1
111-
* @param type $string2
112-
* @return type
110+
* @param string $string1
111+
* @param string $string2
112+
* @return int
113113
*/
114114
public static function EditDistance($string1, $string2)
115115
{

tests/src/webd/language/StringDistanceTest.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class StringDistanceTest extends TestCase
88
{
99

1010
/**
11-
* @var Distance
11+
* @var StringDistance
1212
*/
1313
protected $object;
1414

@@ -24,7 +24,6 @@ protected function setUp() : void
2424

2525
/**
2626
* @covers webd\language\Distance::Jaro
27-
* @todo Implement testJaro().
2827
*/
2928
public function testJaro()
3029
{
@@ -33,7 +32,6 @@ public function testJaro()
3332

3433
/**
3534
* @covers webd\language\Distance::JaroWinkler
36-
* @todo Implement testJaroWinkler().
3735
*/
3836
public function testJaroWinkler()
3937
{

0 commit comments

Comments
 (0)