Completed
Push — master ( 122bdb...4f8f85 )
by Jens
10:49 queued 41s
created

Asset::fieldDefinitions()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 8

Duplication

Lines 11
Ratio 100 %

Code Coverage

Tests 7
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 11
loc 11
ccs 7
cts 7
cp 1
rs 9.4285
cc 1
eloc 8
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 string getId()
14
 * @method Asset setId(string $id = null)
15
 * @method AssetSourceCollection getSources()
16
 * @method Asset setSources(AssetSourceCollection $sources = null)
17
 * @method LocalizedString getName()
18
 * @method Asset setName(LocalizedString $name = null)
19
 * @method LocalizedString getDescription()
20
 * @method Asset setDescription(LocalizedString $description = null)
21
 * @method array getTags()
22
 * @method Asset setTags(array $tags = null)
23
 * @method CustomFieldObject getCustom()
24
 * @method Asset setCustom(CustomFieldObject $custom = null)
25
 */
26 View Code Duplication
class Asset 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...
27
{
28 1
    public function fieldDefinitions()
29
    {
30
        return [
31 1
            'id' => [static::TYPE => 'string'],
32 1
            'sources' => [static::TYPE => '\Commercetools\Core\Model\Common\AssetSourceCollection'],
33 1
            'name' => [static::TYPE => '\Commercetools\Core\Model\Common\LocalizedString'],
34 1
            'description' => [static::TYPE => '\Commercetools\Core\Model\Common\LocalizedString'],
35 1
            'tags' => [static::TYPE => 'array'],
36 1
            'custom' => [static::TYPE => '\Commercetools\Core\Model\CustomField\CustomFieldObject'],
37
        ];
38
    }
39
}
40