Completed
Push — master ( 009411...7fe99b )
by Rafał
18:49 queued 07:10
created

ContentListAction   A

Complexity

Total Complexity 8

Size/Duplication

Total Lines 60
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 8
lcom 0
cbo 0
dl 0
loc 60
rs 10
c 0
b 0
f 0

8 Methods

Rating   Name   Duplication   Size   Complexity  
A getPosition() 0 4 1
A setPosition() 0 4 1
A isSticky() 0 4 1
A setSticky() 0 4 1
A getAction() 0 4 1
A setAction() 0 4 1
A getContentId() 0 4 1
A setContentId() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of the Superdesk Web Publisher Content List Component.
7
 *
8
 * Copyright 2020 Sourcefabric z.ú. and contributors.
9
 *
10
 * For the full copyright and license information, please see the
11
 * AUTHORS and LICENSE files distributed with this source code.
12
 *
13
 * @copyright 2020 Sourcefabric z.ú
14
 * @license http://www.superdesk.org/license
15
 */
16
17
namespace SWP\Component\ContentList\Model;
18
19
class ContentListAction
20
{
21
    public const ACTION_MOVE = 'move';
22
23
    public const ACTION_ADD = 'add';
24
25
    public const ACTION_DELETE = 'delete';
26
27
    /** @var int */
28
    private $position = 0;
29
30
    /** @var bool */
31
    private $sticky = false;
32
33
    /** @var string|null */
34
    private $action;
35
36
    /** @var int */
37
    private $contentId;
38
39
    public function getPosition(): int
40
    {
41
        return $this->position;
42
    }
43
44
    public function setPosition(int $position): void
45
    {
46
        $this->position = $position;
47
    }
48
49
    public function isSticky(): bool
50
    {
51
        return $this->sticky;
52
    }
53
54
    public function setSticky(bool $sticky = false): void
55
    {
56
        $this->sticky = $sticky;
57
    }
58
59
    public function getAction(): ?string
60
    {
61
        return $this->action;
62
    }
63
64
    public function setAction(string $action): void
65
    {
66
        $this->action = $action;
67
    }
68
69
    public function getContentId(): ?int
70
    {
71
        return $this->contentId;
72
    }
73
74
    public function setContentId(int $contentId): void
75
    {
76
        $this->contentId = $contentId;
77
    }
78
}
79