This class seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate
the same code in three or more different places, we strongly encourage you to
look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.
Loading history...
15
{
16
/**
17
* @param SheduleEmail $tasks
18
*/
19
public function postEmail(SheduleEmail $tasks) : void
20
{
21
1
Mail::raw($tasks->email->text, function ($message) use ($tasks) {
22
1
$message->subject($tasks->email->theme);
23
1
$message->from(config('mail.from.address'));
24
1
$message->to(config('mail.from.address'));
25
26
1
$tasks->email->users->each(function ($value) use ($message) {
The expression return trans('postman::mode.one.name') could return the type Illuminate\Contracts\Tra...n\Translator|null|array which is incompatible with the type-hinted return string. Consider adding an additional type-check to rule them out.
The expression return trans('postman::mode.one.description') could return the type Illuminate\Contracts\Tra...n\Translator|null|array which is incompatible with the type-hinted return string. Consider adding an additional type-check to rule them out.
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.