Code Duplication    Length = 10-10 lines in 5 locations

Sitemap/Entity/SitemapIndex.php 1 location

@@ 11-20 (lines=10) @@
8
    protected $lastmod;
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 3 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
    {
@@ 16-25 (lines=10) @@
13
    const PLATFORM_MOBILE = 'mobile';
14
    const PLATFORM_WEB = 'web';
15
16
    public function setTitle($title)
17
    {
18
        if (strlen($title) > 100) {
19
            throw new \DomainException('The title value must be less than 100 characters');
20
        }
21
22
        $this->title = $title;
23
24
        return $this;
25
    }
26
27
    public function setDescription($description)
28
    {
@@ 144-153 (lines=10) @@
141
        return $this;
142
    }
143
144
    public function setCategory($category)
145
    {
146
        if (strlen($category) > 256) {
147
            throw new \DomainException('The category value must be less than 256 characters');
148
        }
149
150
        $this->category = $category;
151
152
        return $this;
153
    }
154
155
    public function setRestrictions($restrictions, $relationship = self::RESTRICTION_DENY)
156
    {