Subsite::getType()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Osnova\Services\Subsites;
4
5
use Osnova\Services\ServiceEntity;
6
use Osnova\Services\Timeline\Interfaces\TimelineOwnerInterface;
7
8
class Subsite extends ServiceEntity implements TimelineOwnerInterface
9
{
10
    /**
11
     * Get subsite ID.
12
     *
13
     * @return int|null
14
     */
15
    public function getId()
16
    {
17
        return $this->getData('id');
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->getData('id') also could return the type array|string which is incompatible with the documented return type integer|null.
Loading history...
18
    }
19
20
    /**
21
     * Get subsite URL.
22
     *
23
     * @return string|null
24
     */
25
    public function getUrl()
26
    {
27
        return $this->getData('url');
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->getData('url') also could return the type array which is incompatible with the documented return type null|string.
Loading history...
28
    }
29
30
    /**
31
     * Get subsite type.
32
     *
33
     * @return int|null
34
     */
35
    public function getType()
36
    {
37
        return $this->getData('type');
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->getData('type') also could return the type array|string which is incompatible with the documented return type integer|null.
Loading history...
38
    }
39
40
    /**
41
     * Get subsite name.
42
     *
43
     * @return string|null
44
     */
45
    public function getName()
46
    {
47
        return $this->getData('name');
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->getData('name') also could return the type array which is incompatible with the documented return type null|string.
Loading history...
48
    }
49
50
    /**
51
     * Get subsite description.
52
     *
53
     * @return string|null
54
     */
55
    public function getDescription()
56
    {
57
        return $this->getData('description');
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->getData('description') also could return the type array which is incompatible with the documented return type null|string.
Loading history...
58
    }
59
60
    /**
61
     * Get subsite avatar URL.
62
     *
63
     * @return string|null
64
     */
65
    public function getAvatarUrl()
66
    {
67
        return $this->getData('avatar_url');
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->getData('avatar_url') also could return the type array which is incompatible with the documented return type null|string.
Loading history...
68
    }
69
70
    /**
71
     * Get subsite head cover.
72
     *
73
     * @return mixed
74
     */
75
    public function getHeadCover()
76
    {
77
        return $this->getData('head_cover');
78
    }
79
80
    /**
81
     * Get the timeline URL prefix.
82
     *
83
     * @return string
84
     */
85
    public function getTimelineUrlPrefix()
86
    {
87
        return 'subsite/'.$this->getId().'/timeline';
88
    }
89
}
90