for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
Install GitHub App
<?php
/**
* Created by PhpStorm.
* User: Mark
* Date: 16/10/2016
* Time: 14:34.
*/
namespace App\Classes;
use Mail;
use App\Model\Account;
class Email
{
public $from;
/** @var Account */
public $to;
public $cc;
public $bcc;
public $header;
public $subject;
public $message;
// store special items for the email to use.
public $content = [];
public function to(Account $account)
$this->to = $account;
return $this;
}
public function header($message)
$this->header = $message;
public function from($email)
$this->from = $email;
public function subject($title)
$this->subject = $title;
public function message($message)
$this->message = $message;
* Attach a value to the email message.
*
* @param $key
* @param $value
* @return $this
public function with($key, $value)
$this->content[$key] = $value;
public function send($view)
$from = $this->from ?: '[email protected]';
$header = $this->header ?: 'Coffeebreak CMS';
$this->to = $this->to ?: account();
Mail::send($view, ['email' => $this], function ($m) use ($header, $from) {
$m->from($from, $header);
$m->to($this->to->email())->subject($this->subject." on '".tenant()->domain."'");
tenant
If this is a false-positive, you can also ignore this issue in your code via the ignore-call annotation
ignore-call
$m->to($this->to->email())->subject($this->subject." on '"./** @scrutinizer ignore-call */ tenant()->domain."'");
});