New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OOM in psalter #4266
Labels
Comments
I found these snippets: https://psalm.dev/r/21b0457ab9<?php
/**
* File callback interface.
*/
interface FileCallbackInterface
{
/**
* Get file.
*
* @return mixed
*/
public function getFile();
/**
* Invoke callback.
*
* @param int $percent Percent
* @param int $speed Speed in mbps
* @param int $time Time
*
* @return mixed
*/
public function __invoke($percent, $speed, $time);
}
class Test
{
/**
* @param mixed $callable Callable
* @param callable $cb Callback (DEPRECATED, use FileCallbackInterface)
*
* @return \Generator<array>
*/
public function uploadFromCallable(callable $callable, $cb = null): void
{
if (\is_object($callable) && $callable instanceof FileCallbackInterface) {
$cb = $callable;
$callable = $callable->getFile();
}
if ($cb === null) {
$cb = function ($percent) {
};
}
$cb = function () use ($cb) {
$cb(0);
};
}
}
|
muglug
added a commit
that referenced
this issue
Oct 7, 2020
muglug
added a commit
that referenced
this issue
Oct 7, 2020
danog
pushed a commit
to danog/psalm
that referenced
this issue
Jan 29, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
psalter OOMs with the following snippet: https://psalm.dev/r/21b0457ab9
The text was updated successfully, but these errors were encountered: