public function onReservationKeyReady(callable $callback = null)
    {
        if ($callback === null || is_callable($callback)) {
            $this->on_reservation_key_ready = $callback;
        } else {
            throw new InvalidArgumentException('Callable or NULL expected');
        }
    }
public function onReservationKeyReady(callable $callback = null)
    {
        if ($callback === null || is_callable($callback)) {
            $this->on_reservation_key_ready = $callback;
        } else {
            throw new InvalidArgumentException('Callable or NULL expected');
        }
    }
public function onReservationKeyReady ( callable $ callback = null ) { if ( $ callback === null || is_callable ( $ callback ) ) { $ this -> on_reservation_key_ready = $ callback ; } else { throw new InvalidArgumentException ( 'Callable or NULL expected' ) ; } }
Callback that is called when reservation key is prepared for a particular job, but not yet set.

This callback is useful for testing job snatching when we have multiple workers

@param callable|null $callback
Callback that is called when reservation key is prepared for a particular job but not yet set .