Code Duplication    Length = 11-11 lines in 2 locations

src/Element/Link.php 2 locations

@@ 143-153 (lines=11) @@
140
    /**
141
     * @inheritDoc
142
     */
143
    public function toArray()
144
    {
145
        return array_merge(parent::toArray(), [
146
            'title' => $this->title,
147
            'url' => $this->url,
148
            'attributes' => $this->attributes->toArray(),
149
            'activeAttributes' => $this->activeAttributes->toArray(),
150
            'linkAttributes' => $this->linkAttributes->toArray(),
151
            'displayRule' => $this->canDisplay(),
152
        ]);
153
    }
154
155
    /**
156
     * @inheritDoc
@@ 165-175 (lines=11) @@
162
        parent::unserialize($serialized);
163
    }
164
165
    protected function propertiesForSerialization()
166
    {
167
        return array_merge(parent::propertiesForSerialization(), [
168
            'title' => $this->title,
169
            'url' => $this->url,
170
            'attributes' => $this->attributes,
171
            'activeAttributes' => $this->activeAttributes,
172
            'linkAttributes' => $this->linkAttributes,
173
            'displayRule' => $this->serializeRule(),
174
        ]);
175
    }
176
}