Upgrade PHPStan level to 5

[MAILPOET-1915]
This commit is contained in:
Pavel Dohnal
2019-03-20 16:16:59 +01:00
committed by M. Shull
parent 21766421d5
commit f3f769316a
9 changed files with 16 additions and 15 deletions

View File

@@ -15,7 +15,7 @@ class Security {
static function generateRandomString($length = 5) {
// non-cryptographically strong random generator
return substr(
md5(uniqid(mt_rand(), true)),
md5(uniqid((string)mt_rand(), true)),
0,
min(max(5, (int)$length), 32)
);

View File

@@ -10,7 +10,7 @@ class Url {
// Remove WPFunctions::get()->homeUrl() path from add_query_arg
if (isset($home_url['path'])) {
$query_args = str_replace($home_url['path'], null, $query_args);
$query_args = str_replace($home_url['path'], '', $query_args);
}
return WPFunctions::get()->homeUrl($query_args);