Code Duplication    Length = 11-11 lines in 2 locations

lib/Entity/ChannelsRequestParameters.php 1 location

@@ 28-38 (lines=11) @@
25
{
26
    use AccessorTrait;
27
28
    public function setOrder(string $order): self
29
    {
30
        $pool = ['asc', 'desc'];
31
32
        // Silently ignore wrong values
33
        if (in_array($order, $pool)) {
34
            $this->container['order'] = $order;
35
        }
36
37
        return $this;
38
    }
39
}
40

lib/Entity/VideosRequestParameters.php 1 location

@@ 42-52 (lines=11) @@
39
{
40
    use AccessorTrait;
41
42
    public function setOrder(string $order): self
43
    {
44
        $pool = ['asc', 'desc'];
45
46
        // Silently ignore wrong values
47
        if (in_array($order, $pool)) {
48
            $this->container['order'] = $order;
49
        }
50
51
        return $this;
52
    }
53
54
    public function setPublicationState(string $publicationState): self
55
    {