Code Duplication    Length = 7-8 lines in 3 locations

src/Bridge/Symfony/Routing/IriConverter.php 3 locations

@@ 95-102 (lines=8) @@
92
    /**
93
     * {@inheritdoc}
94
     */
95
    public function getIriFromResourceClass(string $resourceClass, int $referenceType = UrlGeneratorInterface::ABS_PATH): string
96
    {
97
        try {
98
            return $this->router->generate($this->routeNameResolver->getRouteName($resourceClass, OperationType::COLLECTION), [], $referenceType);
99
        } catch (RoutingExceptionInterface $e) {
100
            throw new InvalidArgumentException(sprintf('Unable to generate an IRI for "%s".', $resourceClass), $e->getCode(), $e);
101
        }
102
    }
103
104
    /**
105
     * {@inheritdoc}
@@ 107-113 (lines=7) @@
104
    /**
105
     * {@inheritdoc}
106
     */
107
    public function getItemIriFromResourceClass(string $resourceClass, array $identifiers, int $referenceType = UrlGeneratorInterface::ABS_PATH): string {
108
        try {
109
            return $this->router->generate($this->routeNameResolver->getRouteName($resourceClass, OperationType::ITEM), $identifiers, $referenceType);
110
        } catch (RoutingExceptionInterface $e) {
111
            throw new InvalidArgumentException(sprintf('Unable to generate an IRI for "%s".', $resourceClass), $e->getCode(), $e);
112
        }
113
    }
114
115
    /**
116
     * {@inheritdoc}
@@ 118-125 (lines=8) @@
115
    /**
116
     * {@inheritdoc}
117
     */
118
    public function getSubresourceIriFromResourceClass(string $resourceClass, array $identifiers, int $referenceType = UrlGeneratorInterface::ABS_PATH): string
119
    {
120
        try {
121
            return $this->router->generate($this->routeNameResolver->getRouteName($resourceClass, OperationType::SUBRESOURCE), $identifiers, $referenceType);
122
        } catch (RoutingExceptionInterface $e) {
123
            throw new InvalidArgumentException(sprintf('Unable to generate an IRI for "%s".', $resourceClass), $e->getCode(), $e);
124
        }
125
    }
126
127
    /**
128
     * Find identifiers from an Item (Object).