Completed
Push — master ( 7ee0d9...1aff7f )
by Rafał
24:06 queued 15:30
created

AnalyticsReport   A

Complexity

Total Complexity 10

Size/Duplication

Total Lines 70
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 0
Metric Value
wmc 10
lcom 0
cbo 3
dl 0
loc 70
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 getAssetId() 0 4 1
A setAssetId() 0 4 1
A getFileExtension() 0 4 1
A setFileExtension() 0 4 1
A getUser() 0 4 1
A setUser() 0 4 1
A getStatus() 0 4 1
A setStatus() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of the Superdesk Web Publisher Core Bundle.
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\Bundle\CoreBundle\Model;
18
19
use SWP\Component\Common\Model\DateTime;
20
use SWP\Component\Common\Model\TimestampableTrait;
21
use SWP\Component\MultiTenancy\Model\TenantAwareTrait;
22
23
class AnalyticsReport implements AnalyticsReportInterface
24
{
25
    use TimestampableTrait;
26
    use TenantAwareTrait;
27
28
    /** @var int */
29
    protected $id;
30
31
    /** @var string */
32
    protected $assetId;
33
34
    /** @var string */
35
    protected $fileExtension;
36
37
    /** @var UserInterface */
38
    protected $user;
39
40
    /** @var string */
41
    protected $status = AnalyticsReportInterface::STATUS_PROCESSING;
42
43
    public function __construct()
44
    {
45
        $this->createdAt = DateTime::getCurrentDateTime();
46
    }
47
48
    public function getId(): int
49
    {
50
        return $this->id;
51
    }
52
53
    public function getAssetId(): string
54
    {
55
        return $this->assetId;
56
    }
57
58
    public function setAssetId(string $assetId): void
59
    {
60
        $this->assetId = $assetId;
61
    }
62
63
    public function getFileExtension(): string
64
    {
65
        return $this->fileExtension;
66
    }
67
68
    public function setFileExtension($fileExtension): void
69
    {
70
        $this->fileExtension = $fileExtension;
71
    }
72
73
    public function getUser(): UserInterface
74
    {
75
        return $this->user;
76
    }
77
78
    public function setUser(UserInterface $user): void
79
    {
80
        $this->user = $user;
81
    }
82
83
    public function getStatus(): string
84
    {
85
        return $this->status;
86
    }
87
88
    public function setStatus(string $status): void
89
    {
90
        $this->status = $status;
91
    }
92
}
93