public function call(): int
    {
        $count = 0;

        while (!$this->queue->isEmpty() && (0 === $this->maxDepth || $count < $this->maxDepth)) {
            list($callback, $args) = $this->queue->shift();
            ++$count;

            if (empty($args)) {
                $callback();
            } else {
                call_user_func_array($callback, $args);
            }
        }

        return $count;
    }
public function call(): int
    {
        $count = 0;

        while (!$this->queue->isEmpty() && (0 === $this->maxDepth || $count < $this->maxDepth)) {
            list($callback, $args) = $this->queue->shift();
            ++$count;

            if (empty($args)) {
                $callback();
            } else {
                call_user_func_array($callback, $args);
            }
        }

        return $count;
    }
public function call ( ) : int { $ count = 0 ; while ( ! $ this -> queue -> isEmpty ( ) && ( 0 === $ this -> maxDepth || $ count < $ this -> maxDepth ) ) { list ( $ callback , $ args ) = $ this -> queue -> shift ( ) ; ++ $ count ; if ( empty ( $ args ) ) { $ callback ( ) ; } else { call_user_func_array ( $ callback , $ args ) ; } } return $ count ; }
Executes each callback that was in the queue when this method is called up to the maximum depth.

@return int Number of functions called.
Executes each callback that was in the queue when this method is called up to the maximum depth .