Add PHPStan and other quality checks
Similar to FreshRSS core Contributes to https://github.com/FreshRSS/Extensions/issues/184
This commit is contained in:
parent
a86467db48
commit
b49596818c
59 changed files with 1173 additions and 404 deletions
|
|
@ -1,14 +1,28 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace ShareByEmail\mailers;
|
||||
|
||||
class Share extends \Minz_Mailer {
|
||||
public function send_article($to, $subject, $content) {
|
||||
$this->view->_path('share_mailer/article.txt');
|
||||
final class Share extends \Minz_Mailer {
|
||||
|
||||
/** @var View */
|
||||
protected $view;
|
||||
|
||||
public function __construct() {
|
||||
parent::__construct(View::class);
|
||||
}
|
||||
|
||||
public function send_article(string $to, string $subject, string $content): bool {
|
||||
$this->view->_path('share_mailer/article.txt.php');
|
||||
|
||||
$this->view->content = $content;
|
||||
|
||||
$subject_prefix = '[' . \FreshRSS_Context::$system_conf->title . ']';
|
||||
if (isset(\FreshRSS_Context::$system_conf)) {
|
||||
$subject_prefix = '[' . \FreshRSS_Context::$system_conf->title . ']';
|
||||
} else {
|
||||
$subject_prefix = '';
|
||||
}
|
||||
return $this->mail($to, $subject_prefix . ' ' . $subject);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue