Code Duplication    Length = 20-21 lines in 4 locations

src/Famoser/SyncApi/Models/Communication/Request/CollectionEntityRequest.php 1 location

@@ 23-42 (lines=20) @@
20
 * an collection request; is handled by the collection controller and sent to /collections/*
21
 * @package Famoser\SyncApi\Models\Communication\Request
22
 */
23
class CollectionEntityRequest extends BaseRequest
24
{
25
    /* @var CollectionCommunicationEntity[] $CollectionEntities */
26
    public $CollectionEntities;
27
28
    /**
29
     * gets the json properties needed to deserialize
30
     *
31
     * @return AbstractJsonValueProperty[]
32
     */
33
    public function getJsonProperties()
34
    {
35
        $arr = parent::getJsonProperties();
36
        $arr['CollectionEntities'] = new ArrayProperty(
37
            'CollectionEntities',
38
            new ObjectProperty('CollectionEntities', new CollectionCommunicationEntity())
39
        );
40
        return $arr;
41
    }
42
}
43

src/Famoser/SyncApi/Models/Communication/Request/HistoryEntityRequest.php 1 location

@@ 23-43 (lines=21) @@
20
 * specify the id of the entity you want to history from, and list the version ids you already have
21
 * @package Famoser\SyncApi\Models\Communication\Request
22
 */
23
class HistoryEntityRequest extends BaseRequest
24
{
25
    /* @var string $Id type_of:guid */
26
    public $Id;
27
28
    /* @var string[] $VersionIds type_of:guid[] */
29
    public $VersionIds;
30
31
    /**
32
     * gets the json properties needed to deserialize
33
     *
34
     * @return AbstractJsonValueProperty[]
35
     */
36
    public function getJsonProperties()
37
    {
38
        $arr = parent::getJsonProperties();
39
        $arr['Id'] = new TextProperty('Id');
40
        $arr['VersionIds'] = new ArrayProperty('VersionIds', new TextProperty('VersionIds'));
41
        return $arr;
42
    }
43
}
44

src/Famoser/SyncApi/Models/Communication/Request/SyncEntityRequest.php 1 location

@@ 22-41 (lines=20) @@
19
 * the entities to be synced
20
 * @package Famoser\SyncApi\Models\Communication\Request
21
 */
22
class SyncEntityRequest extends BaseRequest
23
{
24
    /* @var SyncCommunicationEntity[] $SyncEntities */
25
    public $SyncEntities;
26
27
    /**
28
     * gets the json properties needed to deserialize
29
     *
30
     * @return AbstractJsonValueProperty[]
31
     */
32
    public function getJsonProperties()
33
    {
34
        $arr = parent::getJsonProperties();
35
        $arr['SyncEntities'] = new ArrayProperty(
36
            'SyncEntities',
37
            new ObjectProperty('SyncEntities', new SyncCommunicationEntity())
38
        );
39
        return $arr;
40
    }
41
}
42

src/Famoser/SyncApi/Models/Communication/Request/DeviceEntityRequest.php 1 location

@@ 23-42 (lines=20) @@
20
 * the entities to be synced
21
 * @package Famoser\SyncApi\Models\Communication\Request
22
 */
23
class DeviceEntityRequest extends BaseRequest
24
{
25
    /* @var DeviceCommunicationEntity[] $DeviceEntities */
26
    public $DeviceEntities;
27
28
    /**
29
     * gets the json properties needed to deserialize
30
     *
31
     * @return AbstractJsonValueProperty[]
32
     */
33
    public function getJsonProperties()
34
    {
35
        $arr = parent::getJsonProperties();
36
        $arr['DeviceEntities'] = new ArrayProperty(
37
            'DeviceEntities',
38
            new ObjectProperty('DeviceEntities', new DeviceCommunicationEntity())
39
        );
40
        return $arr;
41
    }
42
}
43