Ship the migrated LaySite 1.5.2 site ready to start

This commit is contained in:
2026-11-28 14:58:07 +08:00
parent c105ff288c
commit e2bff08f7d
1161 changed files with 153308 additions and 2 deletions
+44
View File
@@ -0,0 +1,44 @@
<?php
declare(strict_types=1);
namespace GuzzleHttp\Promise;
final class State
{
private function __construct()
{
}
/**
* Returns true if a promise is pending.
*/
public static function isPending(PromiseInterface $promise): bool
{
return $promise->getState() === PromiseInterface::PENDING;
}
/**
* Returns true if a promise is fulfilled or rejected.
*/
public static function isSettled(PromiseInterface $promise): bool
{
return $promise->getState() !== PromiseInterface::PENDING;
}
/**
* Returns true if a promise is fulfilled.
*/
public static function isFulfilled(PromiseInterface $promise): bool
{
return $promise->getState() === PromiseInterface::FULFILLED;
}
/**
* Returns true if a promise is rejected.
*/
public static function isRejected(PromiseInterface $promise): bool
{
return $promise->getState() === PromiseInterface::REJECTED;
}
}