Code Duplication    Length = 10-10 lines in 4 locations

Sitemap/Entity/SitemapIndex.php 1 location

@@ 11-20 (lines=10) @@
8
    protected $lastmod = null;
9
    protected $urlCount = 0;
10
11
    public function setLoc($loc)
12
    {
13
        if (strlen($loc) > 2048) {
14
            throw new \DomainException('The loc value must be less than 2,048 characters');
15
        }
16
17
        $this->loc = $loc;
18
19
        return $this;
20
    }
21
22
    public function getLoc()
23
    {

Sitemap/Entity/Url.php 1 location

@@ 22-31 (lines=10) @@
19
    protected $videos = [];
20
    protected $images = [];
21
22
    public function setLoc($loc)
23
    {
24
        if (strlen($loc) > 2048) {
25
            throw new \DomainException('The loc value must be less than 2,048 characters');
26
        }
27
28
        $this->loc = $loc;
29
30
        return $this;
31
    }
32
33
    public function getLoc()
34
    {

Sitemap/Entity/Video.php 2 locations

@@ 27-36 (lines=10) @@
24
        return $this;
25
    }
26
27
    public function setDescription($description)
28
    {
29
        if (strlen($description) > 2048) {
30
            throw new \DomainException('The description value must be less than 2,048 characters');
31
        }
32
33
        $this->description = $description;
34
35
        return $this;
36
    }
37
38
    public function setPlayerLoc($loc, $allowEmbed = true, $autoplay = null)
39
    {
@@ 145-154 (lines=10) @@
142
        return $this;
143
    }
144
145
    public function setCategory($category)
146
    {
147
        if (strlen($category) > 256) {
148
            throw new \DomainException('The category value must be less than 256 characters');
149
        }
150
151
        $this->category = $category;
152
153
        return $this;
154
    }
155
156
    public function setRestrictions($restrictions, $relationship = self::RESTRICTION_DENY)
157
    {