src/Waiter.php
private function determineState($result)
    {
        foreach ($this->config['acceptors'] as $acceptor) {
            $matcher = 'matches' . ucfirst($acceptor['matcher']);
            if ($this->{$matcher}($result, $acceptor)) {
                return $acceptor['state'];
            }
        }

        return $result instanceof \Exception ? 'failed' : 'retry';
    }
private function determineState($result)
    {
        foreach ($this->config['acceptors'] as $acceptor) {
            $matcher = 'matches' . ucfirst($acceptor['matcher']);
            if ($this->{$matcher}($result, $acceptor)) {
                return $acceptor['state'];
            }
        }

        return $result instanceof \Exception ? 'failed' : 'retry';
    }
private function determineState ( $ result ) { foreach ( $ this -> config [ 'acceptors' ] as $ acceptor ) { $ matcher = 'matches' . ucfirst ( $ acceptor [ 'matcher' ] ) ; if ( $ this -> { $ matcher } ( $ result , $ acceptor ) ) { return $ acceptor [ 'state' ] ; } } return $ result instanceof \ Exception ? 'failed' : 'retry' ; }
Determines the state of the waiter attempt, based on the result of
polling the resource. A waiter can have the state of "success", "failed",
or "retry".

@param mixed $result

@return string Will be "success", "failed", or "retry"
Determines the state of the waiter attempt based on the result of polling the resource . A waiter can have the state of success failed or retry .