Code Duplication    Length = 13-13 lines in 2 locations

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

@@ 168-180 (lines=13) @@
165
     *
166
     * @return string|null
167
     */
168
    public function getTranslatedFieldDefinitionName(ValueObject $content, $fieldDefIdentifier, $forcedLanguage = null)
169
    {
170
        if ($contentType = $this->getContentType($content)) {
171
            return $this->translationHelper->getTranslatedFieldDefinitionProperty(
172
                $contentType,
173
                $fieldDefIdentifier,
174
                'name',
175
                $forcedLanguage
176
            );
177
        }
178
179
        throw new InvalidArgumentType('$content', 'Content|ContentInfo', $content);
180
    }
181
182
    /**
183
     * Gets name of a FieldDefinition description by loading ContentType based on Content/ContentInfo object.
@@ 193-205 (lines=13) @@
190
     *
191
     * @return string|null
192
     */
193
    public function getTranslatedFieldDefinitionDescription(ValueObject $content, $fieldDefIdentifier, $forcedLanguage = null)
194
    {
195
        if ($contentType = $this->getContentType($content)) {
196
            return $this->translationHelper->getTranslatedFieldDefinitionProperty(
197
                $contentType,
198
                $fieldDefIdentifier,
199
                'description',
200
                $forcedLanguage
201
            );
202
        }
203
204
        throw new InvalidArgumentType('$content', 'Content|ContentInfo', $content);
205
    }
206
207
    /**
208
     * Checks if a given field is considered empty.