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) { 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 // get label or display default label
$text = ( $text = (
@ -402,8 +402,6 @@ class Pages {
: $this->wp->__('Manage your subscription', 'mailpoet') : $this->wp->__('Manage your subscription', 'mailpoet')
); );
return '<a href="' . $this->subscriptionUrlFactory->getManageUrl( return '<a href="' . $this->subscriptionUrlFactory->getManageUrl($this->subscriber) . '">' . $text . '</a>';
$this->subscriber ?: null
) . '">' . $text . '</a>';
} }
} }

View File

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

View File

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