<?php

namespace Interop\Amqp;

use Interop\Queue\PsrConsumer;

/**
 * @method AmqpMessage|null receiveNoWait()
 * @method AmqpMessage|null receive(int $timeout)
 * @method AmqpQueue getQueue()
 * @method void acknowledge(AmqpMessage $message)
 * @method void reject(AmqpMessage $message, bool $requeue)
 */
interface AmqpConsumer extends PsrConsumer
{
    const FLAG_NOPARAM = 0;
    const FLAG_NOLOCAL = 1;
    const FLAG_NOACK = 2;
    const FLAG_EXCLUSIVE = 4;
    const FLAG_NOWAIT = 8;

    /**
     * @param string $consumerTag
     */
    public function setConsumerTag($consumerTag);

    /**
     * @return string
     */
    public function getConsumerTag();

    public function clearFlags();

    /**
     * @param int $flag
     */
    public function addFlag($flag);

    /**
     * @return int
     */
    public function getFlags();

    /**
     * @param int $flags
     */
    public function setFlags($flags);
}

<?php

namespace Interop\Amqp;

use Interop\Queue\PsrConsumer;

/**
 * @method AmqpMessage|null receiveNoWait()
 * @method AmqpMessage|null receive(int $timeout = 0)
 * @method AmqpQueue getQueue()
 * @method void acknowledge(AmqpMessage $message)
 * @method void reject(AmqpMessage $message, bool $requeue)
 */
interface AmqpConsumer extends PsrConsumer
{
    const FLAG_NOPARAM = 0;
    const FLAG_NOLOCAL = 1;
    const FLAG_NOACK = 2;
    const FLAG_EXCLUSIVE = 4;
    const FLAG_NOWAIT = 8;

    /**
     * @param string $consumerTag
     */
    public function setConsumerTag($consumerTag);

    /**
     * @return string
     */
    public function getConsumerTag();

    public function clearFlags();

    /**
     * @param int $flag
     */
    public function addFlag($flag);

    /**
     * @return int
     */
    public function getFlags();

    /**
     * @param int $flags
     */
    public function setFlags($flags);
}

Include default timeout value from interface
Include default timeout value from interface

Both the interface (`Interop\Queue\PsrConsumer`) and the implementation (for example `Enqueue\AmqpBunny\AmqpConsumer`) seem to have a default value for the `receive()` method's first and only parameter `$timeout`. This default value (`0`) isn't included in the `@method` annotation in `Interop\Queue\PsrConsumer\AmqpConsumer` which makes code completion in an IDE give a false positive when leaving out the (optional) parameter.

Including this default value in the annotation fixes this problem. There is no effect on the actual functionality or operation of this interop library or any of it's decendants.