| Total Complexity | 4 |
| Total Lines | 53 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 12 | class EmailNewTechTipComment extends Notification |
||
| 13 | { |
||
| 14 | use Queueable; |
||
| 15 | |||
| 16 | protected $commentData; |
||
| 17 | protected $tipData; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * Create a new notification instance. |
||
| 21 | * |
||
| 22 | * @return void |
||
| 23 | */ |
||
| 24 | public function __construct(NewTipCommentEvent $commentData) |
||
| 25 | { |
||
| 26 | $this->commentData = $commentData; |
||
| 27 | $this->tipData = TechTip::find($commentData->tip_id); |
||
| 28 | } |
||
| 29 | |||
| 30 | /** |
||
| 31 | * Get the notification's delivery channels. |
||
| 32 | * |
||
| 33 | * @param mixed $notifiable |
||
| 34 | * @return array |
||
| 35 | */ |
||
| 36 | public function via($notifiable) |
||
| 39 | } |
||
| 40 | |||
| 41 | /** |
||
| 42 | * Get the mail representation of the notification. |
||
| 43 | * |
||
| 44 | * @param mixed $notifiable |
||
| 45 | * @return \Illuminate\Notifications\Messages\MailMessage |
||
| 46 | */ |
||
| 47 | public function toMail($notifiable) |
||
| 48 | { |
||
| 49 | return (new MailMessage) |
||
| 50 | ->subject('A Tech Tip has been commented on') |
||
| 51 | ->greeting($this->commentData->user.' has commented on Tech Tip - '.$this->tipData->subject) |
||
| 52 | ->line($this->commentData->comment) |
||
| 53 | ->action('Click to View the Tech Tip', url(route('tech-tips.show', $this->tipData->slug))); |
||
| 54 | } |
||
| 55 | |||
| 56 | /** |
||
| 57 | * Get the array representation of the notification. |
||
| 58 | * |
||
| 59 | * @param mixed $notifiable |
||
| 60 | * @return array |
||
| 61 | */ |
||
| 62 | public function toArray($notifiable) |
||
| 65 | // |
||
| 66 | ]; |
||
| 67 | } |
||
| 69 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.