[tests] phpstan version bump
This commit is contained in:
@@ -659,6 +659,7 @@ function validate_input(array $inputs): array
|
||||
}
|
||||
$outputs[$key] = $id;
|
||||
} elseif (in_array('user_name', $flags)) {
|
||||
// @phpstan-ignore-next-line - phpstan thinks $value can never be empty?
|
||||
if (strlen($value) < 1) {
|
||||
throw new InvalidInput("Username must be at least 1 character");
|
||||
} elseif (!preg_match('/^[a-zA-Z0-9-_]+$/', $value)) {
|
||||
|
@@ -67,6 +67,7 @@ if(class_exists("\\PHPUnit\\Framework\\TestCase")) {
|
||||
if (is_null(User::by_name($name))) {
|
||||
$userPage = new UserPage();
|
||||
$userPage->onUserCreation(new UserCreationEvent($name, $name, $name, "$name@$name.com", false));
|
||||
// @phpstan-ignore-next-line - ???
|
||||
assert(!is_null(User::by_name($name)), "Creation of user $name failed");
|
||||
}
|
||||
}
|
||||
|
@@ -151,6 +151,7 @@ function check_im_version(): int
|
||||
function is_trusted_proxy(): bool
|
||||
{
|
||||
$ra = $_SERVER['REMOTE_ADDR'] ?? "0.0.0.0";
|
||||
// @phpstan-ignore-next-line - TRUSTED_PROXIES is defined in config
|
||||
foreach(TRUSTED_PROXIES as $proxy) {
|
||||
if(ip_in_range($ra, $proxy)) {
|
||||
return true;
|
||||
@@ -615,6 +616,7 @@ function _set_up_shimmie_environment(): void
|
||||
// The trace system has a certain amount of memory consumption every time it is used,
|
||||
// so to prevent running out of memory during complex operations code that uses it should
|
||||
// check if tracer output is enabled before making use of it.
|
||||
// @phpstan-ignore-next-line - TRACE_FILE is defined in config
|
||||
$tracer_enabled = !is_null('TRACE_FILE');
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user