Completed
Push — master ( 9c95f5...e428dc )
by Paweł
06:06
created

Settings   A

Complexity

Total Complexity 10

Size/Duplication

Total Lines 109
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 10
lcom 0
cbo 1
dl 0
loc 109
rs 10
c 0
b 0
f 0

10 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getId() 0 4 1
A getName() 0 4 1
A setName() 0 4 1
A getScope() 0 4 1
A setScope() 0 4 1
A getValue() 0 4 1
A setValue() 0 4 1
A getOwner() 0 4 1
A setOwner() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of the Superdesk Web Publisher Settings Bundle.
7
 *
8
 * Copyright 2017 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 2017 Sourcefabric z.ú
14
 * @license http://www.superdesk.org/license
15
 */
16
17
namespace SWP\Bundle\SettingsBundle\Model;
18
19
use SWP\Component\Common\Model\TimestampableTrait;
20
21
class Settings implements SettingsInterface
22
{
23
    use TimestampableTrait;
24
25
    /**
26
     * @var int
27
     */
28
    protected $id;
29
30
    /**
31
     * @var string
32
     */
33
    protected $name;
34
35
    /**
36
     * @var string
37
     */
38
    protected $scope;
39
40
    /**
41
     * @var string
42
     */
43
    protected $value;
44
45
    /**
46
     * @var int
47
     */
48
    protected $owner;
49
50
    /**
51
     * Settings constructor.
52
     */
53
    public function __construct()
54
    {
55
        $this->setCreatedAt(new \DateTime());
56
    }
57
58
    /**
59
     * {@inheritdoc}
60
     */
61
    public function getId()
62
    {
63
        return $this->id;
64
    }
65
66
    /**
67
     * {@inheritdoc}
68
     */
69
    public function getName(): string
70
    {
71
        return $this->name;
72
    }
73
74
    /**
75
     * {@inheritdoc}
76
     */
77
    public function setName(string $name)
78
    {
79
        $this->name = $name;
80
    }
81
82
    /**
83
     * {@inheritdoc}
84
     */
85
    public function getScope(): string
86
    {
87
        return $this->scope;
88
    }
89
90
    /**
91
     * {@inheritdoc}
92
     */
93
    public function setScope(string $scope)
94
    {
95
        $this->scope = $scope;
96
    }
97
98
    /**
99
     * {@inheritdoc}
100
     */
101
    public function getValue(): string
102
    {
103
        return $this->value;
104
    }
105
106
    /**
107
     * {@inheritdoc}
108
     */
109
    public function setValue(string $value)
110
    {
111
        $this->value = $value;
112
    }
113
114
    /**
115
     * {@inheritdoc}
116
     */
117
    public function getOwner()
118
    {
119
        return $this->owner;
120
    }
121
122
    /**
123
     * {@inheritdoc}
124
     */
125
    public function setOwner(int $owner)
126
    {
127
        $this->owner = $owner;
128
    }
129
}
130