From f768d9a97a105cbad96c4ea4bade3ec2202f1c60 Mon Sep 17 00:00:00 2001 From: Maurizio Date: Thu, 22 Jul 2021 17:04:39 +0200 Subject: [PATCH] refactor: change `usernameRules` and `getUserData` visibility (#172) --- src/Actions/CreateNewUser.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Actions/CreateNewUser.php b/src/Actions/CreateNewUser.php index d54a8a9..3102b47 100644 --- a/src/Actions/CreateNewUser.php +++ b/src/Actions/CreateNewUser.php @@ -84,7 +84,7 @@ private function buildValidator(array $input): Illuminate return Validator::make($input, static::createValidationRules()); } - private function getUserData(array $input): array + public function getUserData(array $input): array { $userData = [ 'name' => $input['name'], @@ -99,7 +99,7 @@ private function getUserData(array $input): array return $userData; } - private static function usernameRules(): array + protected static function usernameRules(): array { $rules = ['required', 'string', 'max:255', 'unique:users'];