CoreFiles by mySites.guru
Is.php46 lines, 999 bytes, from Joomla_5.1.0-beta1-Beta-Full_Package.zip
Raw History Compare with 5.0.0-beta3
md5
b6a680742fdfafac933172d79974fdda
sha1
3e828784fd01257921a2320a7d7c4759795ddb68
sha256
74db164c07385ce29926999988f01d95043971decf349a0548c417642bbdd624
<?php

namespace GuzzleHttp\Promise;

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

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

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

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

The same content is in 39 releases, Joomla 5.1.0-beta1 to 5.3.0-alpha3. See them all, or every version of this file.