We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1299284 commit fac88d4Copy full SHA for fac88d4
src/Framework/Constraint/StringStartsWith.php
@@ -9,7 +9,6 @@
9
*/
10
namespace PHPUnit\Framework\Constraint;
11
12
-use function strlen;
13
use function strpos;
14
use PHPUnit\Framework\InvalidArgumentException;
15
@@ -26,7 +25,7 @@ final class StringStartsWith extends Constraint
26
25
27
public function __construct(string $prefix)
28
{
29
- if (strlen($prefix) === 0) {
+ if ($prefix === '') {
30
throw InvalidArgumentException::create(1, 'non-empty string');
31
}
32
0 commit comments