43 public function resolve(mixed $value) : void{
44 if($this->shared->state !== null){
45 throw new \LogicException(
"Promise has already been resolved/rejected");
47 $this->shared->state =
true;
48 $this->shared->result = $value;
49 foreach($this->shared->onSuccess as $c){
52 $this->shared->onSuccess = [];
53 $this->shared->onFailure = [];