src/Model/Subscription.php
public function wait(callable $onPoll = null, $interval = 2)
    {
        while ($this->isPending()) {
            sleep($interval > 1 ? $interval : 1);
            $this->refresh();
            if ($onPoll !== null) {
                $onPoll($this);
            }
        }
    }
public function wait(callable $onPoll = null, $interval = 2)
    {
        while ($this->isPending()) {
            sleep($interval > 1 ? $interval : 1);
            $this->refresh();
            if ($onPoll !== null) {
                $onPoll($this);
            }
        }
    }
public function wait ( callable $ onPoll = null , $ interval = 2 ) { while ( $ this -> isPending ( ) ) { sleep ( $ interval > 1 ? $ interval : 1 ) ; $ this -> refresh ( ) ; if ( $ onPoll !== null ) { $ onPoll ( $ this ) ; } } }
Wait for the subscription's project to be provisioned.

@param callable  $onPoll   A function that will be called every time the
subscription is refreshed. It will be passed
one argument: the Subscription object.
@param int       $interval The polling interval, in seconds.
Wait for the subscription s project to be provisioned .