o2system /
reactor
| 1 | <?php |
||||||
| 2 | /** |
||||||
| 3 | * This file is part of the O2System Reactor package. |
||||||
| 4 | * |
||||||
| 5 | * For the full copyright and license information, please view the LICENSE |
||||||
| 6 | * file that was distributed with this source code. |
||||||
| 7 | * |
||||||
| 8 | * @author Steeve Andrian Salim |
||||||
| 9 | * @copyright Copyright (c) Steeve Andrian Salim |
||||||
| 10 | */ |
||||||
| 11 | |||||||
| 12 | |||||||
| 13 | namespace O2System\Reactor\Libraries; |
||||||
| 14 | |||||||
| 15 | |||||||
| 16 | use O2System\Email\DataStructures\Config; |
||||||
|
0 ignored issues
–
show
|
|||||||
| 17 | use O2System\Email\Message; |
||||||
|
0 ignored issues
–
show
The type
O2System\Email\Message 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 Loading history...
|
|||||||
| 18 | use O2System\Email\Spool; |
||||||
|
0 ignored issues
–
show
The type
O2System\Email\Spool 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 Loading history...
|
|||||||
| 19 | use O2System\Spl\Traits\Collectors\ConfigCollectorTrait; |
||||||
| 20 | use O2System\Spl\Traits\Collectors\ErrorCollectorTrait; |
||||||
| 21 | |||||||
| 22 | /** |
||||||
| 23 | * Class Email |
||||||
| 24 | * @package O2System\Reactor\Libraries |
||||||
| 25 | */ |
||||||
| 26 | class Email extends Message |
||||||
| 27 | { |
||||||
| 28 | use ConfigCollectorTrait; |
||||||
| 29 | use ErrorCollectorTrait; |
||||||
| 30 | |||||||
| 31 | /** |
||||||
| 32 | * Email::__construct |
||||||
| 33 | */ |
||||||
| 34 | public function __construct() |
||||||
| 35 | { |
||||||
| 36 | if ($config = config()->loadFile('email', true)) { |
||||||
|
0 ignored issues
–
show
The method
loadFile() does not exist on O2System\Kernel\DataStructures\Config.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces. This is most likely a typographical error or the method has been renamed. Loading history...
|
|||||||
| 37 | $this->setConfig($config->getArrayCopy()); |
||||||
| 38 | } |
||||||
| 39 | } |
||||||
| 40 | |||||||
| 41 | // ------------------------------------------------------------------------ |
||||||
| 42 | |||||||
| 43 | /** |
||||||
| 44 | * Email::subject |
||||||
| 45 | * |
||||||
| 46 | * @param string $subject |
||||||
| 47 | * |
||||||
| 48 | * @return Message |
||||||
| 49 | */ |
||||||
| 50 | public function subject($subject) |
||||||
| 51 | { |
||||||
| 52 | $subject = language()->getLine($subject); |
||||||
| 53 | |||||||
| 54 | return parent::subject($subject); |
||||||
| 55 | } |
||||||
| 56 | |||||||
| 57 | // ------------------------------------------------------------------------ |
||||||
| 58 | |||||||
| 59 | /** |
||||||
| 60 | * Email::with |
||||||
| 61 | * |
||||||
| 62 | * @param mixed $vars |
||||||
| 63 | * @param mixed $value |
||||||
| 64 | * |
||||||
| 65 | * @return static |
||||||
| 66 | */ |
||||||
| 67 | public function with($vars, $value = null) |
||||||
| 68 | { |
||||||
| 69 | view()->with($vars, $value); |
||||||
|
0 ignored issues
–
show
The function
view was not found. Maybe you did not declare it correctly or list all dependencies?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||||
| 70 | |||||||
| 71 | return $this; |
||||||
| 72 | } |
||||||
| 73 | |||||||
| 74 | // ------------------------------------------------------------------------ |
||||||
| 75 | |||||||
| 76 | /** |
||||||
| 77 | * Email::template |
||||||
| 78 | * |
||||||
| 79 | * @param string $filename |
||||||
| 80 | * @param array $vars |
||||||
| 81 | * |
||||||
| 82 | * @return static |
||||||
| 83 | */ |
||||||
| 84 | public function template($filename, array $vars = []) |
||||||
| 85 | { |
||||||
| 86 | if ($view = view()->load($filename, $vars, true)) { |
||||||
|
0 ignored issues
–
show
The function
view was not found. Maybe you did not declare it correctly or list all dependencies?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||||
| 87 | $this->body($view); |
||||||
| 88 | } |
||||||
| 89 | |||||||
| 90 | return $this; |
||||||
| 91 | } |
||||||
| 92 | |||||||
| 93 | // ------------------------------------------------------------------------ |
||||||
| 94 | |||||||
| 95 | /** |
||||||
| 96 | * Email::send |
||||||
| 97 | * |
||||||
| 98 | * @return bool |
||||||
| 99 | */ |
||||||
| 100 | public function send() |
||||||
| 101 | { |
||||||
| 102 | $spool = new Spool(new Config($this->config)); |
||||||
| 103 | |||||||
| 104 | if ($spool->send($this)) { |
||||||
| 105 | return true; |
||||||
| 106 | } |
||||||
| 107 | |||||||
| 108 | $this->setErrors($spool->getErrors()); |
||||||
| 109 | |||||||
| 110 | return false; |
||||||
| 111 | } |
||||||
| 112 | } |
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