Use phpstan level 2

[MAILPOET-1822]
This commit is contained in:
Pavel Dohnal
2019-02-20 13:55:10 +01:00
committed by M. Shull
parent 37d2134811
commit bed80e67f1
25 changed files with 123 additions and 31 deletions

View File

@@ -3,9 +3,19 @@ namespace MailPoet\Models;
if (!defined('ABSPATH')) exit;
/**
* @property int $newsletter_id
* @property int $queue_id
* @property string $url
* @property string $hash
*/
class NewsletterLink extends Model {
public static $_table = MP_NEWSLETTER_LINKS_TABLE;
/**
* @param Newsletter $newsletter
* @return \stdClass|null
*/
static function findTopLinkForNewsletter(Newsletter $newsletter) {
$link = self::selectExpr('links.*')
->selectExpr('count(*)', 'clicksCount')