Code Duplication    Length = 13-13 lines in 2 locations

eZ/Publish/Core/MVC/Symfony/Templating/Twig/Extension/ContentExtension.php 2 locations

@@ 174-186 (lines=13) @@
171
     *
172
     * @return string|null
173
     */
174
    public function getTranslatedFieldDefinitionName(ValueObject $content, $fieldDefIdentifier, $forcedLanguage = null)
175
    {
176
        if ($contentType = $this->getContentType($content)) {
177
            return $this->translationHelper->getTranslatedFieldDefinitionProperty(
178
                $contentType,
179
                $fieldDefIdentifier,
180
                'name',
181
                $forcedLanguage
182
            );
183
        }
184
185
        throw new InvalidArgumentType('$content', 'Content|ContentInfo', $content);
186
    }
187
188
    /**
189
     * Gets name of a FieldDefinition description by loading ContentType based on Content/ContentInfo object.
@@ 199-211 (lines=13) @@
196
     *
197
     * @return string|null
198
     */
199
    public function getTranslatedFieldDefinitionDescription(ValueObject $content, $fieldDefIdentifier, $forcedLanguage = null)
200
    {
201
        if ($contentType = $this->getContentType($content)) {
202
            return $this->translationHelper->getTranslatedFieldDefinitionProperty(
203
                $contentType,
204
                $fieldDefIdentifier,
205
                'description',
206
                $forcedLanguage
207
            );
208
        }
209
210
        throw new InvalidArgumentType('$content', 'Content|ContentInfo', $content);
211
    }
212
213
    /**
214
     * Gets translated property generic helper.