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

@@ -105,7 +105,12 @@ class Worker {
->withStatistics();
}
private function prepareContext(Newsletter $newsletter, NewsletterLink $link = null) {
/**
* @param Newsletter $newsletter
* @param \stdClass|NewsletterLink $link
* @return array
*/
private function prepareContext(Newsletter $newsletter, $link = null) {
$clicked = ($newsletter->statistics['clicked'] * 100) / $newsletter->total_sent;
$opened = ($newsletter->statistics['opened'] * 100) / $newsletter->total_sent;
$unsubscribed = ($newsletter->statistics['unsubscribed'] * 100) / $newsletter->total_sent;