Code Duplication    Length = 9-9 lines in 2 locations

src/Model/Message/Attachment/Template/Element/OpenGraphElement.php 1 location

@@ 53-61 (lines=9) @@
50
     *
51
     * @return \Kerox\Messenger\Model\Message\Attachment\Template\Element\OpenGraphElement
52
     */
53
    public function setButtons(array $buttons): self
54
    {
55
        $this->isValidArray($buttons, 1);
56
        $this->isValidButtons($buttons, $this->getAllowedButtonsType());
57
58
        $this->buttons = $buttons;
59
60
        return $this;
61
    }
62
63
    protected function getAllowedButtonsType(): array
64
    {

src/Model/ProfileSettings/PersistentMenu.php 1 location

@@ 70-78 (lines=9) @@
67
     *
68
     * @return \Kerox\Messenger\Model\ProfileSettings\PersistentMenu
69
     */
70
    public function addButtons(array $buttons): self
71
    {
72
        $this->isValidArray($buttons, 5);
73
        $this->isValidButtons($buttons, $this->getAllowedButtonsType());
74
75
        $this->buttons = $buttons;
76
77
        return $this;
78
    }
79
80
    protected function getAllowedButtonsType(): array
81
    {