Skip to content

Commit

Permalink
Remove string type declaration of parameter (#1639)
Browse files Browse the repository at this point in the history
Fixes #1635

because:

* Covariance allows a child's method to return a more specific type than the return type of its parent's method.
* Contravariance allows a parameter type to be less specific in a child method, than that of its parent.
  • Loading branch information
maks-rafalko committed Jan 8, 2022
1 parent ce77925 commit 66a42db
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/FileSystem/Finder/Iterator/RealPathFilterIterator.php
Expand Up @@ -77,7 +77,7 @@ public function accept()
*
* @return string regexp corresponding to a given string or regexp
*/
protected function toRegex(string $str): string
protected function toRegex($str): string
{
return $this->isRegex($str) ? $str : '/' . preg_quote($str, '/') . '/';
}
Expand Down

0 comments on commit 66a42db

Please sign in to comment.