CoreFiles by mySites.guru
Is.php40 lines, 941 bytes, from Joomla_5.4.11-Stable-Full_Package.zip
Raw History Compare with 5.4.10
md5
204e24c23f926d408a321a113314b911
sha1
21dc7675fe34d3592a42320c5aef09cf8638756d
sha256
34bdf0c61855358046972692a23451ce2ec139a3731687285e7a065d1ea7b3df
<?php

declare(strict_types=1);

namespace GuzzleHttp\Promise;

final class Is
{
    /**
     * Returns true if a promise is pending.
     */
    public static function pending(PromiseInterface $promise): bool
    {
        return $promise->getState() === PromiseInterface::PENDING;
    }

    /**
     * Returns true if a promise is fulfilled or rejected.
     */
    public static function settled(PromiseInterface $promise): bool
    {
        return $promise->getState() !== PromiseInterface::PENDING;
    }

    /**
     * Returns true if a promise is fulfilled.
     */
    public static function fulfilled(PromiseInterface $promise): bool
    {
        return $promise->getState() === PromiseInterface::FULFILLED;
    }

    /**
     * Returns true if a promise is rejected.
     */
    public static function rejected(PromiseInterface $promise): bool
    {
        return $promise->getState() === PromiseInterface::REJECTED;
    }
}

The same content is in 97 releases, Joomla 5.3.0-beta1 to 6.3.0-alpha1. See them all, or every version of this file.