Completed
Branch TYPO3v9 (42c67e)
by Tomas Norre
17:38
created

Entry::setTstamp()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

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