From 76f9f5dadca1809e061664045d8f4b70c6865f8c Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Fri, 26 Apr 2019 07:57:06 +0200 Subject: [PATCH] fixed typos --- src/Validator.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Validator.php b/src/Validator.php index 94d3580c1..ae57bff65 100644 --- a/src/Validator.php +++ b/src/Validator.php @@ -65,7 +65,7 @@ public static function validateClassName(string $className, string $errorMessage public static function notBlank(string $value = null): string { if (null === $value || '' === $value) { - throw new RuntimeCommandException('This value cannot be blank'); + throw new RuntimeCommandException('This value cannot be blank.'); } return $value; @@ -181,7 +181,7 @@ public static function classExists(string $className, string $errorMessage = '') self::notBlank($className); if (!class_exists($className)) { - $errorMessage = $errorMessage ?: sprintf('Class "%s" doesn\'t exists. Please enter existing full class name', $className); + $errorMessage = $errorMessage ?: sprintf('Class "%s" doesn\'t exist; please enter an existing full class name.', $className); throw new RuntimeCommandException($errorMessage); } @@ -194,15 +194,15 @@ public static function entityExists(string $className = null, array $entities = self::notBlank($className); if (empty($entities)) { - throw new RuntimeCommandException('There is no registered entities. Please create entity before use this command'); + throw new RuntimeCommandException('There is no registered entities; please create entity before use this command.'); } if (0 === strpos($className, '\\')) { - self::classExists($className, sprintf('Entity "%s" doesn\'t exists. Please enter existing one or create new', $className)); + self::classExists($className, sprintf('Entity "%s" doesn\'t exist; please enter an existing one or create a new one.', $className)); } if (!\in_array($className, $entities)) { - throw new RuntimeCommandException(sprintf('Entity "%s" doesn\'t exists. Please enter existing one or create new', $className)); + throw new RuntimeCommandException(sprintf('Entity "%s" doesn\'t exist; please enter an existing one or create a new one.', $className)); } return $className; @@ -213,7 +213,7 @@ public static function classDoesNotExist($className): string self::notBlank($className); if (class_exists($className)) { - throw new RuntimeCommandException(sprintf('Class "%s" already exists', $className)); + throw new RuntimeCommandException(sprintf('Class "%s" already exists.', $className)); } return $className;