also looking at this
Apply fixes from StyleCI
#79
3 files
+7
-6
| @@ -16,6 +16,6 @@ class InvalidFormatException extends Exception | ||
| 16 | 16 | $customMessage = $message ? " {$message}" : ' ID is not a valid integer'; |
| 17 | 17 | |
| 18 | 18 | parent::__construct('Error on line '.$this->getLine().' in '.$this->getFile() |
| 19 | . $customMessage); | |
| 19 | .$customMessage); | |
| 20 | 20 | } |
| 21 | 21 | } |
| @@ -5,14 +5,15 @@ namespace Meema\MeemaClient\Traits; | ||
| 5 | 5 | trait ValidsUuid |
| 6 | 6 | { |
| 7 | 7 | /** |
| 8 | * Check if a given string is a valid UUID | |
| 8 | * Check if a given string is a valid UUID. | |
| 9 | 9 | * |
| 10 | 10 | * @param string $uuid |
| 11 | 11 | * |
| 12 | * @return boolean | |
| 12 | * @return bool | |
| 13 | 13 | */ |
| 14 | public function isValidUuid( $uuid ) { | |
| 15 | if (!is_string($uuid) || (preg_match('/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/', $uuid) !== 1)) { | |
| 14 | public function isValidUuid($uuid) | |
| 15 | { | |
| 16 | if (! is_string($uuid) || (preg_match('/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/', $uuid) !== 1)) { | |
| 16 | 17 | return false; |
| 17 | 18 | } |
| 18 | 19 | |