Code Duplication    Length = 19-23 lines in 2 locations

src/Entities/ChosenInlineResult.php 1 location

@@ 29-47 (lines=19) @@
26
/** \class ChosenInlineResult
27
 * \brief Represents the result of an inline query that was chosen by the user.
28
 */
29
class ChosenInlineResult implements \ArrayAccess
30
{
31
32
    /** @} */
33
34
    use EntityAccess;
35
36
    /**
37
     * \brief Get result's query.
38
     * @return $query Null if it's empty.
39
     */
40
    public function getQuery() : string
41
    {
42
        return isset($this->container['query']) ? $this->container['query'] : null;
43
    }
44
45
    /**
46
     * \brief Get the chat ID where the result comes from.
47
     * @return $chat_id Chat ID.
48
     */
49
    public function getChatID()
50
    {

src/Entities/Message.php 1 location

@@ 29-51 (lines=23) @@
26
/** \class Message
27
 * \brief This object represents a message.
28
 */
29
class Message implements \ArrayAccess
30
{
31
    /** @} */
32
33
    use EntityAccess;
34
35
    /**
36
     * \brief Get text parameter if it is set.
37
     * @return string If set or <code>null</code> otherwise.
38
     */
39
public function getText() : string
40
    {
41
        return isset($this->container['text']) ? $this->container['text'] : null;
42
    }
43
44
    /**
45
     * \brief Get the chat ID where the result comes from.
46
     * @return $chat_id Chat ID.
47
     */
48
    public function getChatID()
49
    {
50
        return $this->container['chat']['id'];
51
    }
52
53
    public function getMessageId() : int
54
    {