Code Duplication    Length = 14-14 lines in 3 locations

Seo/Og/OgSeoGenerator.php 1 location

@@ 120-133 (lines=14) @@
117
     *
118
     * @return $this
119
     */
120
    public function fromResource($resource)
121
    {
122
        if ($resource instanceof TitleSeoInterface) {
123
            $this->setTitle($resource->getSeoTitle());
124
        }
125
        if ($resource instanceof DescriptionSeoInterface) {
126
            $this->setDescription($resource->getSeoDescription());
127
        }
128
        if ($resource instanceof ImageSeoInterface) {
129
            $this->setImage($resource->getSeoImage());
130
        }
131
132
        return $this;
133
    }
134
135
    /**
136
     * @param string $type

Seo/Twitter/TwitterSeoGenerator.php 1 location

@@ 115-128 (lines=14) @@
112
     *
113
     * @return $this
114
     */
115
    public function fromResource($resource)
116
    {
117
        if ($resource instanceof TitleSeoInterface) {
118
            $this->setTitle($resource->getSeoTitle());
119
        }
120
        if ($resource instanceof DescriptionSeoInterface) {
121
            $this->setDescription($resource->getSeoDescription());
122
        }
123
        if ($resource instanceof ImageSeoInterface) {
124
            $this->setImage($resource->getSeoImage());
125
        }
126
127
        return $this;
128
    }
129
130
    /**
131
     * @param string $type

Seo/Basic/BasicSeoGenerator.php 1 location

@@ 125-138 (lines=14) @@
122
     *
123
     * @return $this
124
     */
125
    public function fromResource($resource)
126
    {
127
        if ($resource instanceof TitleSeoInterface) {
128
            $this->setTitle($resource->getSeoTitle());
129
        }
130
        if ($resource instanceof DescriptionSeoInterface) {
131
            $this->setDescription($resource->getSeoDescription());
132
        }
133
        if ($resource instanceof KeywordsSeoInterface) {
134
            $this->setKeywords($resource->getSeoKeywords());
135
        }
136
137
        return $this;
138
    }
139
}
140