Completed
Push — master ( c1916b...69369e )
by Rafał
02:20
created

Tenant::getCreatedAt()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
/**
4
 * This file is part of the Superdesk Web Publisher MultiTenancy Component.
5
 *
6
 * Copyright 2015 Sourcefabric z.u. 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 2015 Sourcefabric z.ú.
12
 * @license http://www.superdesk.org/license
13
 */
14
namespace SWP\Component\MultiTenancy\Model;
15
16
use SWP\Component\Common\Model\EnableableTrait;
17
use SWP\Component\Common\Model\SoftDeletableTrait;
18
use SWP\Component\Common\Model\TimestampableTrait;
19
20
class Tenant implements TenantInterface
0 ignored issues
show
Bug introduced by
There is at least one abstract method in this class. Maybe declare it as abstract, or implement the remaining methods: getCreatedAt, getDeletedAt, getUpdatedAt, isDeleted, isEnabled, setCreatedAt, setDeletedAt, setEnabled, setUpdatedAt
Loading history...
21
{
22
    use SoftDeletableTrait, TimestampableTrait, EnableableTrait;
23
24
    /**
25
     * @var mixed
26
     */
27
    protected $id;
28
29
    /**
30
     * @var string
31
     */
32
    protected $subdomain;
33
34
    /**
35
     * @var string
36
     */
37
    protected $name;
38
39
    /**
40
     * Tenant constructor.
41
     */
42
    public function __construct()
43
    {
44
        $this->createdAt = new \DateTime();
45
    }
46
47
    /**
48
     * {@inheritdoc}
49
     */
50
    public function getId()
51
    {
52
        return $this->id;
53
    }
54
55
    /**
56
     * {@inheritdoc}
57
     */
58
    public function setId($id)
59
    {
60
        $this->id = $id;
61
    }
62
63
    /**
64
     * {@inheritdoc}
65
     */
66
    public function getSubdomain()
67
    {
68
        return $this->subdomain;
69
    }
70
71
    /**
72
     * {@inheritdoc}
73
     */
74
    public function setSubdomain($subdomain)
75
    {
76
        $this->subdomain = $subdomain;
77
    }
78
79
    /**
80
     * {@inheritdoc}
81
     */
82
    public function getName()
83
    {
84
        return $this->name;
85
    }
86
87
    /**
88
     * {@inheritdoc}
89
     */
90
    public function setName($name)
91
    {
92
        $this->name = $name;
93
    }
94
95
    /**
96
     * @return string
97
     */
98
    public function __toString()
99
    {
100
        return (string) $this->subdomain;
101
    }
102
}
103