Update PHPStan

[MAILPOET-3203]
This commit is contained in:
Rostislav Wolny
2020-10-19 16:32:08 +02:00
committed by Veljko V
parent f087ed8348
commit e43819920d
3 changed files with 30 additions and 18 deletions

View File

@ -393,7 +393,7 @@ class Pages {
}
public function getManageLink($params) {
if (!$this->subscriber) return $this->wp->__('Link to subscription management page is only available to mailing lists subscribers.', 'mailpoet');
if (!$this->subscriber instanceof Subscriber) return __('Link to subscription management page is only available to mailing lists subscribers.', 'mailpoet');
// get label or display default label
$text = (
@ -402,8 +402,6 @@ class Pages {
: $this->wp->__('Manage your subscription', 'mailpoet')
);
return '<a href="' . $this->subscriptionUrlFactory->getManageUrl(
$this->subscriber ?: null
) . '">' . $text . '</a>';
return '<a href="' . $this->subscriptionUrlFactory->getManageUrl($this->subscriber) . '">' . $text . '</a>';
}
}

View File

@ -1,7 +1,7 @@
{
"require": {
"phpstan/phpstan": "0.12.48",
"phpstan/phpstan-doctrine": "0.12.20",
"phpstan/phpstan": "0.12.50",
"phpstan/phpstan-doctrine": "0.12.21",
"phpstan/phpstan-phpunit": "0.12.16"
},
"autoload": {

View File

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "7f78416c560fac81628a92db62f97565",
"content-hash": "633897150bc82b16f700def0c4879bf8",
"packages": [
{
"name": "nikic/php-parser",
@ -60,16 +60,16 @@
},
{
"name": "phpstan/phpstan",
"version": "0.12.48",
"version": "0.12.50",
"source": {
"type": "git",
"url": "https://github.com/phpstan/phpstan.git",
"reference": "d364cfbac9ffd869570cdfea7eaa6541c3dac666"
"reference": "b8248f9c81265af75d6d969ca3252aaf3e998f3a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/d364cfbac9ffd869570cdfea7eaa6541c3dac666",
"reference": "d364cfbac9ffd869570cdfea7eaa6541c3dac666",
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/b8248f9c81265af75d6d969ca3252aaf3e998f3a",
"reference": "b8248f9c81265af75d6d969ca3252aaf3e998f3a",
"shasum": ""
},
"require": {
@ -98,20 +98,34 @@
"MIT"
],
"description": "PHPStan - PHP Static Analysis Tool",
"time": "2020-10-01T13:20:16+00:00"
"funding": [
{
"url": "https://github.com/ondrejmirtes",
"type": "github"
},
{
"url": "https://www.patreon.com/phpstan",
"type": "patreon"
},
{
"url": "https://tidelift.com/funding/github/packagist/phpstan/phpstan",
"type": "tidelift"
}
],
"time": "2020-10-16T12:22:23+00:00"
},
{
"name": "phpstan/phpstan-doctrine",
"version": "0.12.20",
"version": "0.12.21",
"source": {
"type": "git",
"url": "https://github.com/phpstan/phpstan-doctrine.git",
"reference": "207a6aedf0ca95c57fb041f3b3c82bcb6e66ad27"
"reference": "6e76d431376d7fc00f26d4bd59d6f60201c79334"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpstan/phpstan-doctrine/zipball/207a6aedf0ca95c57fb041f3b3c82bcb6e66ad27",
"reference": "207a6aedf0ca95c57fb041f3b3c82bcb6e66ad27",
"url": "https://api.github.com/repos/phpstan/phpstan-doctrine/zipball/6e76d431376d7fc00f26d4bd59d6f60201c79334",
"reference": "6e76d431376d7fc00f26d4bd59d6f60201c79334",
"shasum": ""
},
"require": {
@ -134,8 +148,8 @@
"doctrine/orm": "^2.5",
"doctrine/persistence": "^1.1 || ^2.0",
"ergebnis/composer-normalize": "^2.0.2",
"jakub-onderka/php-parallel-lint": "^1.0",
"phing/phing": "^2.16.0",
"php-parallel-lint/php-parallel-lint": "^1.2",
"phpstan/phpstan-phpunit": "^0.12",
"phpstan/phpstan-strict-rules": "^0.12",
"phpunit/phpunit": "^7.0",
@ -164,7 +178,7 @@
"MIT"
],
"description": "Doctrine extensions for PHPStan",
"time": "2020-09-25T13:34:35+00:00"
"time": "2020-10-14T16:25:45+00:00"
},
{
"name": "phpstan/phpstan-phpunit",