This method seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate
the same code in three or more different places, we strongly encourage you to
look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.
Loading history...
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
47
*/
48
public function getPersistentSubscriptionInfo(): PersistentSubscriptionInfo
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.