chillerlan /
php-log
| 1 | <?php |
||
| 2 | /** |
||
| 3 | * Class EmailLog |
||
| 4 | * |
||
| 5 | * @filesource EmailLog.php |
||
| 6 | * @created 04.01.2018 |
||
| 7 | * @package chillerlan\Logger\Output |
||
| 8 | * @author Smiley <[email protected]> |
||
| 9 | * @copyright 2018 Smiley |
||
| 10 | * @license MIT |
||
| 11 | */ |
||
| 12 | |||
| 13 | namespace chillerlan\Logger\Output; |
||
| 14 | |||
| 15 | use chillerlan\Settings\SettingsContainerInterface; |
||
| 16 | use PHPMailer\PHPMailer\PHPMailer; |
||
|
0 ignored issues
–
show
|
|||
| 17 | |||
| 18 | |||
| 19 | class EmailLog extends LogOutputAbstract{ |
||
| 20 | |||
| 21 | protected $mailer; |
||
| 22 | |||
| 23 | /** @noinspection PhpMissingParentConstructorInspection */ |
||
| 24 | /** |
||
| 25 | * EmailLog constructor. |
||
| 26 | * |
||
| 27 | * @param \chillerlan\Settings\SettingsContainerInterface|null $options |
||
| 28 | * @param \PHPMailer\PHPMailer\PHPMailer $mailer |
||
| 29 | */ |
||
| 30 | public function __construct(SettingsContainerInterface $options, PHPMailer $mailer){ |
||
| 31 | $this->options = $options; |
||
|
0 ignored issues
–
show
$options is of type chillerlan\Settings\SettingsContainerInterface, but the property $options was declared to be of type chillerlan\Logger\LogOptions. Are you sure that you always receive this specific sub-class here, or does it make sense to add an instanceof check?
Our type inference engine has found a suspicous assignment of a value to a property. This check raises an issue when a value that can be of a given class or a super-class is assigned to a property that is type hinted more strictly. Either this assignment is in error or an instanceof check should be added for that assignment. class Alien {}
class Dalek extends Alien {}
class Plot
{
/** @var Dalek */
public $villain;
}
$alien = new Alien();
$plot = new Plot();
if ($alien instanceof Dalek) {
$plot->villain = $alien;
}
Loading history...
|
|||
| 32 | $this->mailer = $mailer; |
||
| 33 | } |
||
| 34 | |||
| 35 | protected function __log(string $level, string $message, array $context = null){ |
||
| 36 | // TODO: Implement log() method. |
||
| 37 | } |
||
| 38 | |||
| 39 | } |
||
| 40 |
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