Code Duplication    Length = 23-23 lines in 2 locations

src/Core/Model/Type/Type.php 1 location

@@ 37-59 (lines=23) @@
34
 * @method Type setFieldDefinitions(FieldDefinitionCollection $fieldDefinitions = null)
35
 * @method TypeReference getReference()
36
 */
37
class Type extends Resource
38
{
39
    public function fieldDefinitions()
40
    {
41
        return [
42
            'id' => [static::TYPE => 'string'],
43
            'version' => [static::TYPE => 'int'],
44
            'key' => [static::TYPE => 'string'],
45
            'createdAt' => [
46
                static::TYPE => DateTime::class,
47
                static::DECORATOR => DateTimeDecorator::class
48
            ],
49
            'lastModifiedAt' => [
50
                static::TYPE => DateTime::class,
51
                static::DECORATOR => DateTimeDecorator::class
52
            ],
53
            'name' => [static::TYPE => LocalizedString::class],
54
            'description' => [static::TYPE => LocalizedString::class],
55
            'resourceTypeIds' => [static::TYPE => 'array'],
56
            'fieldDefinitions' => [static::TYPE => FieldDefinitionCollection::class],
57
        ];
58
    }
59
}
60

src/Core/Model/Project/Project.php 1 location

@@ 36-58 (lines=23) @@
33
 * @method int getVersion()
34
 * @method Project setVersion(int $version = null)
35
 */
36
class Project extends JsonObject
37
{
38
    public function fieldDefinitions()
39
    {
40
        return [
41
            'version' => [static::TYPE => 'int'],
42
            'key' => [static::TYPE => 'string'],
43
            'name' => [static::TYPE => 'string'],
44
            'countries' => [static::TYPE => Collection::class],
45
            'currencies' => [static::TYPE => Collection::class],
46
            'languages' => [static::TYPE => Collection::class],
47
            'createdAt' => [
48
                static::TYPE => DateTime::class,
49
                static::DECORATOR => DateTimeDecorator::class
50
            ],
51
            'trialUntil' => [
52
                static::TYPE => DateTime::class,
53
                static::DECORATOR => DateTimeDecorator::class
54
            ],
55
            'messages' => [static::TYPE => MessagesConfiguration::class]
56
        ];
57
    }
58
}
59