Code Duplication    Length = 9-9 lines in 2 locations

src/Client/Http/Feed/EventStreamFeed.php 1 location

@@ 65-73 (lines=9) @@
62
    /**
63
     * @param $link
64
     */
65
    private function validateLink($link)
66
    {
67
        if (!$link instanceof EventStreamFeedLink) {
68
            throw new \InvalidArgumentException('Invalid link type %s.', get_class($link));
69
        }
70
        if (isset($this->links[$link->getRelation()])) {
71
            throw new \InvalidArgumentException(sprintf('Link relation %s already there.', $link->getRelation()));
72
        }
73
    }
74
75
    /**
76
     * @return bool

src/Client/Http/Feed/PersistentSubscriptionInfoFeed.php 1 location

@@ 35-43 (lines=9) @@
32
    /**
33
     * @param $link
34
     */
35
    private function validateLink($link)
36
    {
37
        if (!$link instanceof PersistentSubscriptionInfoFeedLink) {
38
            throw new \InvalidArgumentException('Invalid link type %s.', get_class($link));
39
        }
40
        if (isset($this->links[$link->getRelation()])) {
41
            throw new \InvalidArgumentException(sprintf('Link relation %s already there.', $link->getRelation()));
42
        }
43
    }
44
45
    /**
46
     * @return PersistentSubscriptionInfo