<?php

namespace Telegram\Bot\Objects;

/**
 * Class Update
 *
 * @package Telegram\Bot\Objects
 */
class Update extends BaseObject
{
    /**
     * @inheritdoc
     */
    public function relations()
    {
        return [
            'message' => Message::class,
        ];
    }

    /**
     * Get recent message.
     *
     * @return Update
     */
    public function recentMessage()
    {
        return new static($this->last());
    }
}

<?php

namespace Telegram\Bot\Objects;

/**
 * Class Update
 *
 * @package Telegram\Bot\Objects
 *
 * @method int      getUpdateId()  The update's unique identifier. Update identifiers start from a certain positive number and increase sequentially.
 * @method Message  getMessage()    (Optional). New incoming message of any kind - text, photo, sticker, etc.
 *
 */
class Update extends BaseObject
{
    /**
     * @inheritdoc
     */
    public function relations()
    {
        return [
            'message' => Message::class,
        ];
    }

    /**
     * Get recent message.
     *
     * @return Update
     */
    public function recentMessage()
    {
        return new static($this->last());
    }
}

Add @methods to object doc bloc
Add @methods to object doc bloc
