Completed
Push — master ( c3ce72...f2565d )
by Paweł
20s
created

ArticleEvent::getArticleStatistics()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
/*
4
 * This file is part of the Superdesk Web Publisher Analytics Bundle.
5
 *
6
 * Copyright 2017 Sourcefabric z.ú. and contributors.
7
 *
8
 * For the full copyright and license information, please see the
9
 * AUTHORS and LICENSE files distributed with this source code.
10
 *
11
 * @copyright 2017 Sourcefabric z.ú
12
 * @license http://www.superdesk.org/license
13
 */
14
15
namespace SWP\Bundle\AnalyticsBundle\Model;
16
17
use SWP\Component\Common\Model\TimestampableInterface;
18
use SWP\Component\Common\Model\TimestampableTrait;
19
20
/**
21
 * Class ArticleEvent.
22
 */
23
class ArticleEvent implements ArticleEventInterface, TimestampableInterface
24
{
25
    use TimestampableTrait;
26
27
    /**
28
     * @var int
29
     */
30
    protected $id;
31
32
    /**
33
     * @var string
34
     */
35
    protected $action;
36
37
    /**
38
     * @var null|string
39
     */
40
    protected $value;
41
42
    /**
43
     * @var ArticleStatisticsInterface
44
     */
45
    protected $articleStatistics;
46
47
    /**
48
     * {@inheritdoc}
49
     */
50
    public function getId()
51
    {
52
        return $this->id;
53
    }
54
55
    /**
56
     * {@inheritdoc}
57
     */
58
    public function getAction(): string
59
    {
60
        return $this->action;
61
    }
62
63
    /**
64
     * {@inheritdoc}
65
     */
66
    public function setAction(string $action): void
67
    {
68
        $this->action = $action;
69
    }
70
71
    /**
72
     * {@inheritdoc}
73
     */
74
    public function getValue(): ?string
75
    {
76
        return $this->value;
77
    }
78
79
    /**
80
     * {@inheritdoc}
81
     */
82
    public function setValue(?string $value): void
83
    {
84
        $this->value = $value;
85
    }
86
87
    /**
88
     * {@inheritdoc}
89
     */
90
    public function getArticleStatistics(): ArticleStatisticsInterface
91
    {
92
        return $this->articleStatistics;
93
    }
94
95
    /**
96
     * {@inheritdoc}
97
     */
98
    public function setArticleStatistics(ArticleStatisticsInterface $articleStatistics): void
99
    {
100
        $this->articleStatistics = $articleStatistics;
101
    }
102
}
103