Unverified Commit 99fe1126 authored by Viral Solani's avatar Viral Solani Committed by GitHub

Merge pull request #34 from viralsolani/analysis-z9gJnn

Apply fixes from StyleCI
parents d31c62e0 ab73d353
......@@ -31,7 +31,7 @@ class StoreUserRequest extends Request
'first_name' => 'required|max:255',
'last_name' => 'required|max:255',
'email' => ['required', 'email', 'max:255', Rule::unique('users')],
'password' => 'required|min:6|confirmed'
'password' => 'required|min:6|confirmed',
];
}
......
......@@ -3,8 +3,8 @@
namespace App\Notifications\Frontend\Auth;
use Illuminate\Bus\Queueable;
use Illuminate\Notifications\Notification;
use Illuminate\Notifications\Messages\MailMessage;
use Illuminate\Notifications\Notification;
/**
* Class UserNeedsConfirmation.
......
......@@ -113,14 +113,13 @@ class UserRepository extends BaseRepository
}
/**
* Create User
* Create User.
*
* @param Model $request
*
*/
public function create($request)
{
$data = $request->except('assignees_roles','permissions');
$data = $request->except('assignees_roles', 'permissions');
$roles = $request->all('assignees_roles');
$permissions = $request->all('permissions') ? $request->all('permissions') : [];
$user = $this->createUserStub($data);
......@@ -143,7 +142,7 @@ class UserRepository extends BaseRepository
$this->attachPermissions($permissions);
//Send confirmation email if requested and account approval is off
if (isset($data['confirmation_email']) && $user->confirmed == 0 ) {
if (isset($data['confirmation_email']) && $user->confirmed == 0) {
$user->notify(new UserNeedsConfirmation($user->confirmation_code));
}
......@@ -426,13 +425,15 @@ class UserRepository extends BaseRepository
}
/**
* Attach Permission
* Attach Permission.
*
* @param $permissions
*
* @todo attach permission like role
*
* @return mix
*/
public function attachPermissions($value='')
public function attachPermissions($value = '')
{
$arrUserPermissions = [];
if (isset($permissions) && count($permissions) > 0) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment