phpcompat icon indicating copy to clipboard operation
phpcompat copied to clipboard

False Positive: Guzzlehttp Promises

Open dalcuizar opened this issue 6 years ago • 0 comments

vendor/guzzlehttp/promises/src/functions.php

------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 3 LINES
------------------------------------------------------------------------------------------------------
 222 | WARNING | Function each() is deprecated since PHP 7.2; Use a foreach loop instead
 257 | WARNING | Function each() is deprecated since PHP 7.2; Use a foreach loop instead
 313 | WARNING | Function each() is deprecated since PHP 7.2; Use a foreach loop instead
------------------------------------------------------------------------------------------------------

File uses custom each function:

function each(
    $iterable,
    callable $onFulfilled = null,
    callable $onRejected = null
) {
    return (new EachPromise($iterable, [
        'fulfilled' => $onFulfilled,
        'rejected'  => $onRejected
    ]))->promise();
}

dalcuizar avatar Feb 05 '19 01:02 dalcuizar