Completed
Pull Request — master (#18)
by Tomas Norre
13:28
created

Entry::setIdentifier()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1.0156

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 3
cts 4
cp 0.75
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 1.0156
1
<?php
2
namespace Aoe\FeloginBruteforceProtection\Domain\Model;
3
4
/***************************************************************
5
 *  Copyright notice
6
 *
7
 *  (c) 2019 AOE GmbH <[email protected]>
8
 *
9
 *  All rights reserved
10
 *
11
 *  This script is part of the TYPO3 project. The TYPO3 project is
12
 *  free software; you can redistribute it and/or modify
13
 *  it under the terms of the GNU General Public License as published by
14
 *  the Free Software Foundation; either version 3 of the License, or
15
 *  (at your option) any later version.
16
 *
17
 *  The GNU General Public License can be found at
18
 *  http://www.gnu.org/copyleft/gpl.html.
19
 *
20
 *  This script is distributed in the hope that it will be useful,
21
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
22
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
23
 *  GNU General Public License for more details.
24
 *
25
 *  This copyright notice MUST APPEAR in all copies of the script!
26
 ***************************************************************/
27
28
use TYPO3\CMS\Extbase\DomainObject\AbstractEntity;
29
30
/**
31
 * @package Aoe\FeloginBruteforceProtection\\Domain\Model
32
 *
33
 * @author Kevin Schu <[email protected]>
34
 * @author Andre Wuttig <[email protected]>
35
 *
36
 */
37
class Entry extends AbstractEntity
38
{
39
    /**
40
     * @var string
41
     */
42
    protected $tstamp;
43
44
    /**
45
     * @var string
46
     */
47
    protected $crdate;
48
49
    /**
50
     * @var string
51
     * @validate NotEmpty
52
     */
53
    protected $identifier;
54
55
    /**
56
     * @var integer
57
     * @validate NotEmpty
58
     */
59
    protected $failures;
60
61
    /**
62
     * @param string $crdate
63
     */
64 1
    public function setCrdate($crdate)
65
    {
66 1
        $this->crdate = $crdate;
67 1
    }
68
69
    /**
70
     * @return string
71
     */
72 1
    public function getCrdate()
73
    {
74 1
        return $this->crdate;
75
    }
76
77
    /**
78
     * @param string $tstamp
79
     */
80 1
    public function setTstamp($tstamp)
81
    {
82 1
        $this->tstamp = $tstamp;
83 1
    }
84
85
    /**
86
     * @return string
87
     */
88 1
    public function getTstamp()
89
    {
90 1
        return $this->tstamp;
91
    }
92
93
    /**
94
     * @return string $identifier
95
     */
96 1
    public function getIdentifier()
97
    {
98 1
        return $this->identifier;
99
    }
100
101
    /**
102
     * @param string $identifier
103
     * @return void
104
     */
105 1
    public function setIdentifier($identifier)
106
    {
107 1
        $this->identifier = $identifier;
108 1
    }
109
110
    /**
111
     * @return integer $failures
112
     */
113 2
    public function getFailures()
114
    {
115 2
        return $this->failures;
116
    }
117
118
    /**
119
     * @param integer $failures
120
     * @return void
121
     */
122 2
    public function setFailures($failures)
123
    {
124 2
        $this->failures = $failures;
125 2
    }
126
127
    /**
128
     * @return void
129
     */
130 1
    public function increaseFailures()
131
    {
132 1
        $this->setFailures($this->getFailures() + 1);
133 1
    }
134
}
135