1 | <?php |
||
2 | namespace Yaro\LogEnvelope\Mail; |
||
3 | |||
4 | use Illuminate\Bus\Queueable; |
||
0 ignored issues
–
show
|
|||
5 | use Illuminate\Mail\Mailable; |
||
0 ignored issues
–
show
The type
Illuminate\Mail\Mailable was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths ![]() |
|||
6 | use Illuminate\Queue\SerializesModels; |
||
0 ignored issues
–
show
The type
Illuminate\Queue\SerializesModels was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths ![]() |
|||
7 | use Illuminate\Contracts\Queue\ShouldQueue; |
||
0 ignored issues
–
show
The type
Illuminate\Contracts\Queue\ShouldQueue was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths ![]() |
|||
8 | |||
9 | class LogEmail extends Mailable implements ShouldQueue |
||
10 | { |
||
11 | use Queueable, SerializesModels; |
||
12 | |||
13 | public $data; |
||
14 | public $config; |
||
15 | |||
16 | public function __construct($data, $config) |
||
17 | { |
||
18 | $this->data = $data; |
||
19 | $this->config = $config; |
||
20 | } |
||
21 | |||
22 | /** |
||
23 | * Build the message. |
||
24 | * |
||
25 | * @return $this |
||
26 | */ |
||
27 | public function build() |
||
28 | { |
||
29 | $subject = sprintf('[%s] @ %s: %s', $this->data['class'], $this->data['host'], $this->data['exception']); |
||
30 | |||
31 | // to protect from gmail's anchors automatic generating |
||
32 | $this->withSwiftMessage(function ($message) { |
||
33 | $message->setBody( |
||
34 | preg_replace( |
||
35 | ['~\.~', '~http~'], |
||
36 | ['<span>.</span>', '<span>http</span>'], |
||
37 | $message->getBody() |
||
38 | ) |
||
39 | ); |
||
40 | }); |
||
41 | |||
42 | return $this->view('log-envelope::main') |
||
43 | ->with($this->data) |
||
44 | ->to($this->config['to']) |
||
45 | ->from($this->config['from_email'], $this->config['from_name']) |
||
46 | ->subject($subject); |
||
47 | } |
||
48 | } |
||
49 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths