Completed
Pull Request — develop (#243)
by Jens
09:17
created

AssetDraft::fieldDefinitions()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 7

Duplication

Lines 10
Ratio 100 %

Code Coverage

Tests 6
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 10
loc 10
ccs 6
cts 6
cp 1
rs 9.4285
cc 1
eloc 7
nc 1
nop 0
crap 1
1
<?php
2
/**
3
 * @author @jayS-de <[email protected]>
4
 */
5
6
namespace Commercetools\Core\Model\Common;
7
8
use Commercetools\Core\Model\CustomField\CustomFieldObject;
9
10
/**
11
 * @package Commercetools\Core\Model\Common
12
 *
13
 * @method AssetSourceCollection getSources()
14
 * @method AssetDraft setSources(AssetSourceCollection $sources = null)
15
 * @method LocalizedString getName()
16
 * @method AssetDraft setName(LocalizedString $name = null)
17
 * @method LocalizedString getDescription()
18
 * @method AssetDraft setDescription(LocalizedString $description = null)
19
 * @method array getTags()
20
 * @method AssetDraft setTags(array $tags = null)
21
 * @method CustomFieldObject getCustom()
22
 * @method AssetDraft setCustom(CustomFieldObject $custom = null)
23
 */
24 View Code Duplication
class AssetDraft extends JsonObject
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
25
{
26 1
    public function fieldDefinitions()
27
    {
28
        return [
29 1
            'sources' => [static::TYPE => '\Commercetools\Core\Model\Common\AssetSourceCollection'],
30 1
            'name' => [static::TYPE => '\Commercetools\Core\Model\Common\LocalizedString'],
31 1
            'description' => [static::TYPE => '\Commercetools\Core\Model\Common\LocalizedString'],
32 1
            'tags' => [static::TYPE => 'array'],
33 1
            'custom' => [static::TYPE => '\Commercetools\Core\Model\CustomField\CustomFieldObject'],
34
        ];
35
    }
36
}
37