[WIP] Fix ergonomics rules

This commit is contained in:
Ludovic CANDELLIER
2020-03-30 00:48:17 +02:00
parent 36267139a1
commit cd9b6ea74c
106 changed files with 1392 additions and 747 deletions

View File

@@ -1,66 +0,0 @@
<?php
namespace App\Repositories\Core\User\Notifications;
use Illuminate\Bus\Queueable;
use Illuminate\Notifications\Messages\MailMessage;
use Illuminate\Notifications\Notification;
class NewUser extends Notification
{
use Queueable;
/**
* Get the notification's delivery channels.
*
* @param mixed $notifiable
*
* @return string[]
*/
public function via($notifiable)
{
return ['mail'];
}
/**
* Get the mail representation of the notification.
*
* @param mixed $notifiable
*
* @return \Illuminate\Notifications\Messages\MailMessage
*/
public function toMail($notifiable)
{
$currentUser = \Auth::user();
return (new MailMessage())
->markdown('notifications.email')
->greeting(__('notifications.greeting', ['firstname' => $notifiable->first_name]))
->subject(__('notifications.newuser.subject', ['name' => config('app.name')]))
->line(__('notifications.newuser.intro', [
'name' => $currentUser->first_name.' '.$currentUser->last_name,
]))
->action(
__('notifications.newuser.button'),
route('users.firstlogin', $notifiable->remember_token)
)
->salutation(__('notifications.salutation', [
'name' => $currentUser->first_name.' '.$currentUser->last_name,
]))
->line(__('notifications.newuser.outro'));
}
/**
* Get the array representation of the notification.
*
* @param mixed $notifiable
*
* @return array
*/
public function toArray($notifiable)
{
return [
//
];
}
}

View File

@@ -1,31 +0,0 @@
<?php
namespace App\Repositories\Core\User\Notifications;
use Illuminate\Notifications\Messages\MailMessage;
class ResetPassword extends \Illuminate\Auth\Notifications\ResetPassword
{
/**
* Get the mail representation of the notification.
*
* @param mixed $notifiable
*
* @return \Illuminate\Notifications\Messages\MailMessage
*/
/*
public function toMail($notifiable)
{
return (new MailMessage())
->markdown('notifications.email')
->greeting(__('notifications.greeting', ['firstname' => $notifiable->first_name]))
->subject(__('notifications.resetpassword.subject'))
->line(__('notifications.resetpassword.intro'))
->action(
__('notifications.resetpassword.button'),
route('password.reset', $this->token)
)
->line(__('notifications.resetpassword.outro'));
}
*/
}