@@ 524-533 (lines=10) @@ | ||
521 | } |
|
522 | } |
|
523 | ||
524 | public static function contains($value, $subString, $message = '') |
|
525 | { |
|
526 | if (false === strpos($value, $subString)) { |
|
527 | static::reportInvalidArgument(sprintf( |
|
528 | $message ?: 'Expected a value to contain %2$s. Got: %s', |
|
529 | static::valueToString($value), |
|
530 | static::valueToString($subString) |
|
531 | )); |
|
532 | } |
|
533 | } |
|
534 | ||
535 | public static function notWhitespaceOnly($value, $message = '') |
|
536 | { |
|
@@ 545-554 (lines=10) @@ | ||
542 | } |
|
543 | } |
|
544 | ||
545 | public static function startsWith($value, $prefix, $message = '') |
|
546 | { |
|
547 | if (0 !== strpos($value, $prefix)) { |
|
548 | static::reportInvalidArgument(sprintf( |
|
549 | $message ?: 'Expected a value to start with %2$s. Got: %s', |
|
550 | static::valueToString($value), |
|
551 | static::valueToString($prefix) |
|
552 | )); |
|
553 | } |
|
554 | } |
|
555 | ||
556 | public static function startsWithLetter($value, $message = '') |
|
557 | { |