1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-22 13:51:54 +01:00

Merge pull request #9435 from vimeo/revert-9434-array_pop-is-impure

This commit is contained in:
Bruce Weirdan 2023-03-01 01:48:26 -04:00 committed by GitHub
commit 839dc10da2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 25 deletions

View File

@ -476,7 +476,6 @@ class Functions
'date_default_timezone_set', 'assert_options', 'setlocale',
'set_exception_handler', 'set_time_limit', 'putenv', 'spl_autoload_register',
'spl_autoload_unregister', 'microtime', 'array_rand', 'set_include_path',
'array_pop',
// logging
'openlog', 'syslog', 'error_log', 'define_syslog_variables',

View File

@ -902,30 +902,6 @@ class PureAnnotationTest extends TestCase
',
'error_message' => 'ImpureFunctionCall',
],
'array_popIsNotMutationFree' => [
'code' => <<<'PHP'
<?php
class Stack
{
/** @var array<string> */
private array $stack = [];
public function push(string $item): void
{
$this->stack[] = $item;
}
/** @psalm-mutation-free */
public function next(): string|null
{
return array_pop($this->stack);
}
}
PHP,
'error_message' => 'ImpureFunctionCall',
'ignored_issues' => [],
'php_version' => '8.0',
],
];
}
}