I hereby claim:
- I am cspray on github.
- I am cspray (https://keybase.io/cspray) on keybase.
- I have a public key ASDgKvQd1ACmkJh6ME2WlXVdnigsEpwUUTk4BZF5Xbbjrwo
To claim this, I am signing this object:
<?php | |
declare(strict_types = 1); | |
/** | |
* @license See LICENSE file in project root | |
*/ | |
require_once '/spraybot-app/vendor/autoload.php'; |
<?php | |
abstract class AsyncTestCase extends \PHPUnit\Framework\TestCase { | |
public function runTest() { | |
Loop::run(function() { | |
$watcherId = Loop::delay(1500, function() { | |
Loop::stop(); | |
$this->fail('The asynchronous test was expected to finish before the 1500 millisecond time limit'); | |
}); |
<?php | |
// We assume that your PHPUnit bootstrap will include the appropriate class loader and setup your environment | |
use Amp\Delayed; | |
use Amp\Promise; | |
use Amp\PHPUnit\AsyncTestCase; | |
use function Amp\call; |
PHPUnit 6.5.14 by Sebastian Bergmann and contributors. | |
E.F 3 / 3 (100%) | |
Time: 132 ms, Memory: 4.00MB | |
There was 1 error: | |
1) Amp\PHPUnit\Test\AsyncTestCaseTest::testThatMethodRunsInLoopContext | |
Error: Loop exceptionally stopped without resolving the promise |
<?php | |
namespace MyApp\Command; | |
use Amp\Promise; | |
use Amp\Websocket\Client; | |
use Cspray\WebsocketCommands\ClientPayload; | |
use Cspray\WebsocketCommands\WebsocketCommand; | |
use function Amp\Promise\call; |
I hereby claim:
To claim this, I am signing this object:
<?php | |
require_once __DIR__ . '/vendor/autoload.php'; | |
use YourNamespace\Enums\Compass; | |
$north = Compass::North(); | |
$south = Compass::South(); | |
$east = Compass::East(); | |
$west = Compass::West(); |
<?php | |
namespace YourNamespace\Enums; | |
use Cspray\Yape\Enum; | |
use Cspray\Yape\EnumTrait; | |
final class Compass implements Enum { | |
use EnumTrait; |
<?php | |
// In PHP internals, maybe this is an abstract class instead? | |
// Maybe an attribute? | |
#[Attribute] | |
class FunctionalInterface {} | |
#[FunctionalInterface] | |
interface MyAction { | |
<?php | |
use Cspray\AnnotatedContainer\Attribute\Service; | |
use Cspray\AnnotatedContainer\Attribute\Inject; | |
use Cspray\AnnotatedContainer\ParameterStore; | |
use Cspray\Typiphy\Type; | |
class MySecretParameterStore implements ParameterStore { | |
public function getName() : string { |