Code Duplication    Length = 25-26 lines in 3 locations

eZ/Publish/Core/Repository/Tests/Service/Mock/NameSchemaTest.php 1 location

@@ 207-232 (lines=26) @@
204
    /**
205
     * @return \eZ\Publish\Core\Repository\Values\ContentType\FieldDefinition[]
206
     */
207
    protected function getFieldDefinitions()
208
    {
209
        return array(
210
            new FieldDefinition(
211
                array(
212
                    'id' => '1',
213
                    'identifier' => 'text1',
214
                    'fieldTypeIdentifier' => 'ezstring',
215
                )
216
            ),
217
            new FieldDefinition(
218
                array(
219
                    'id' => '2',
220
                    'identifier' => 'text2',
221
                    'fieldTypeIdentifier' => 'ezstring',
222
                )
223
            ),
224
            new FieldDefinition(
225
                array(
226
                    'id' => '3',
227
                    'identifier' => 'text3',
228
                    'fieldTypeIdentifier' => 'ezstring',
229
                )
230
            ),
231
        );
232
    }
233
234
    /**
235
     * Builds stubbed content for testing purpose.

eZ/Publish/Core/REST/Server/Tests/Input/Parser/ContentCreateTest.php 1 location

@@ 644-668 (lines=25) @@
641
     *
642
     * @return \eZ\Publish\API\Repository\Values\ContentType\ContentType
643
     */
644
    protected function getContentType()
645
    {
646
        return new ContentType(
647
            array(
648
                'id' => 13,
649
                'identifier' => 'some_class',
650
                'fieldDefinitions' => array(
651
                    new FieldDefinition(
652
                        array(
653
                            'id' => 42,
654
                            'identifier' => 'subject',
655
                            'fieldTypeIdentifier' => 'ezstring',
656
                        )
657
                    ),
658
                    new FieldDefinition(
659
                        array(
660
                            'id' => 43,
661
                            'identifier' => 'author',
662
                            'fieldTypeIdentifier' => 'ezstring',
663
                        )
664
                    ),
665
                ),
666
            )
667
        );
668
    }
669
}
670

eZ/Publish/Core/Repository/Tests/Service/Integration/NameSchemaBase.php 1 location

@@ 232-257 (lines=26) @@
229
    /**
230
     * @return \eZ\Publish\Core\Repository\Values\ContentType\FieldDefinition[]
231
     */
232
    protected function getFieldDefinitions()
233
    {
234
        return array(
235
            new FieldDefinition(
236
                array(
237
                    'id' => '1',
238
                    'identifier' => 'text1',
239
                    'fieldTypeIdentifier' => 'ezstring',
240
                )
241
            ),
242
            new FieldDefinition(
243
                array(
244
                    'id' => '2',
245
                    'identifier' => 'text2',
246
                    'fieldTypeIdentifier' => 'ezstring',
247
                )
248
            ),
249
            new FieldDefinition(
250
                array(
251
                    'id' => '3',
252
                    'identifier' => 'text3',
253
                    'fieldTypeIdentifier' => 'ezstring',
254
                )
255
            ),
256
        );
257
    }
258
259
    /**
260
     * Builds stubbed content for testing purpose.