protected function mutate(callable $resolver = null)
    {
        if ($resolver === null)
        {
            return;
        }

        try
        {
            $resolver(
                function ($value = null) {
                    $this->resolve($value);
                },
                function ($reason = null) {
                    $this->reject($reason);
                },
                function ($reason = null) {
                    $this->cancel($reason);
                }
            );
        }
        catch (Error $ex)
        {
            $this->reject($ex);
        }
        catch (Exception $ex)
        {
            $this->reject($ex);
        }
    }
protected function mutate(callable $resolver = null)
    {
        if ($resolver === null)
        {
            return;
        }

        try
        {
            $resolver(
                function ($value = null) {
                    $this->resolve($value);
                },
                function ($reason = null) {
                    $this->reject($reason);
                },
                function ($reason = null) {
                    $this->cancel($reason);
                }
            );
        }
        catch (Error $ex)
        {
            $this->reject($ex);
        }
        catch (Exception $ex)
        {
            $this->reject($ex);
        }
    }
protected function mutate ( callable $ resolver = null ) { if ( $ resolver === null ) { return ; } try { $ resolver ( function ( $ value = null ) { $ this -> resolve ( $ value ) ; } , function ( $ reason = null ) { $ this -> reject ( $ reason ) ; } , function ( $ reason = null ) { $ this -> cancel ( $ reason ) ; } ) ; } catch ( Error $ ex ) { $ this -> reject ( $ ex ) ; } catch ( Exception $ ex ) { $ this -> reject ( $ ex ) ; } }
Mutate resolver.

@param callable|null $resolver
Mutate resolver .