Passed
Push — 3.0 ( 034c4c...8e0310 )
by Rubén
03:57
created

PublicLinkListData::getAccountName()   A

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
 * sysPass
4
 *
5
 * @author    nuxsmin
6
 * @link      https://syspass.org
7
 * @copyright 2012-2018, Rubén Domínguez nuxsmin@$syspass.org
8
 *
9
 * This file is part of sysPass.
10
 *
11
 * sysPass is free software: you can redistribute it and/or modify
12
 * it under the terms of the GNU General Public License as published by
13
 * the Free Software Foundation, either version 3 of the License, or
14
 * (at your option) any later version.
15
 *
16
 * sysPass is distributed in the hope that it will be useful,
17
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19
 * GNU General Public License for more details.
20
 *
21
 * You should have received a copy of the GNU General Public License
22
 *  along with sysPass.  If not, see <http://www.gnu.org/licenses/>.
23
 */
24
25
namespace SP\DataModel;
26
27
use SP\Util\DateUtil;
28
29
defined('APP_ROOT') || die();
30
31
/**
32
 * Class PublicLinkListData
33
 *
34
 * @package SP\DataModel
35
 */
36
class PublicLinkListData extends PublicLinkData
37
{
38
    /**
39
     * @var string
40
     */
41
    public $userName;
42
    /**
43
     * @var string
44
     */
45
    public $userLogin;
46
    /**
47
     * @var string
48
     */
49
    public $accountName;
50
51
    /**
52
     * @return string
53
     */
54
    public function getName()
55
    {
56
        return $this->accountName;
57
    }
58
59
    /**
60
     * @return string
61
     */
62
    public function getUserName()
63
    {
64
        return $this->userName;
65
    }
66
67
    /**
68
     * @return string
69
     */
70
    public function getUserLogin()
71
    {
72
        return $this->userLogin;
73
    }
74
75
    /**
76
     * @return string
77
     */
78
    public function getAccountName()
79
    {
80
        return $this->accountName;
81
    }
82
83
    /**
84
     * @return false|string
85
     */
86
    public function getDateAddFormat()
87
    {
88
        return DateUtil::getDateFromUnix($this->dateAdd);
89
    }
90
91
    /**
92
     * @return false|string
93
     */
94
    public function getDateExpireFormat()
95
    {
96
        return DateUtil::getDateFromUnix($this->dateExpire);
97
    }
98
99
    /**
100
     * @return string
101
     */
102
    public function getCountViewsString()
103
    {
104
        return sprintf('%d/%d/%d', $this->getCountViews(), $this->getMaxCountViews(), $this->getTotalCountViews());
105
    }
106
}