Code Duplication    Length = 11-11 lines in 2 locations

lib/Entity/ChannelsRequestParameters.php 1 location

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

lib/Entity/VideosRequestParameters.php 1 location

@@ 47-57 (lines=11) @@
44
     *
45
     * @return VideosRequestParameters
46
     */
47
    public function setOrder($order)
48
    {
49
        $pool = ['asc', 'desc'];
50
51
        // Silently ignore wrong values
52
        if (in_array($order, $pool)) {
53
            $this->container['order'] = $order;
54
        }
55
56
        return $this;
57
    }
58
59
    /**
60
     * @param string $publicationState