Completed
Push — master ( d535d3...8c6cf6 )
by Felix
16:53
created

Tx_FeatureFlag_Domain_Model_Mapping   A

Complexity

Total Complexity 14

Size/Duplication

Total Lines 149
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 14
lcom 1
cbo 1
dl 0
loc 149
ccs 35
cts 35
cp 1
rs 10
c 0
b 0
f 0

14 Methods

Rating   Name   Duplication   Size   Complexity  
A setCrdate() 0 4 1
A getCrdate() 0 4 1
A setFeatureFlag() 0 4 1
A getFeatureFlag() 0 4 1
A setForeignTableColumn() 0 4 1
A getForeignTableColumn() 0 4 1
A setForeignTableName() 0 4 1
A getForeignTableName() 0 4 1
A setForeignTableUid() 0 4 1
A getForeignTableUid() 0 4 1
A setTstamp() 0 4 1
A getTstamp() 0 4 1
A setBehavior() 0 4 1
A getBehavior() 0 4 1
1
<?php
2
3
/***************************************************************
4
 *  Copyright notice
5
 *
6
 *  (c) 2016 AOE GmbH <[email protected]>
7
 *
8
 *  All rights reserved
9
 *
10
 *  This script is part of the TYPO3 project. The TYPO3 project is
11
 *  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
 *  The GNU General Public License can be found at
17
 *  http://www.gnu.org/copyleft/gpl.html.
18
 *
19
 *  This script is distributed in the hope that it will be useful,
20
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
21
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
22
 *  GNU General Public License for more details.
23
 *
24
 *  This copyright notice MUST APPEAR in all copies of the script!
25
 ***************************************************************/
26
27
/**
28
 * @package FeatureFlag
29
 * @subpackage Domain_Model
30
 */
31
class Tx_FeatureFlag_Domain_Model_Mapping extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
0 ignored issues
show
Coding Style Compatibility introduced by
PSR1 recommends that each class must be in a namespace of at least one level to avoid collisions.

You can fix this by adding a namespace to your class:

namespace YourVendor;

class YourClass { }

When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.

Loading history...
Coding Style introduced by
This class is not in CamelCase format.

Classes in PHP are usually named in CamelCase.

In camelCase names are written without any punctuation, the start of each new word being marked by a capital letter. The whole name starts with a capital letter as well.

Thus the name database provider becomes DatabaseProvider.

Loading history...
32
{
33
    /**
34
     * @var string
35
     */
36
    protected $tstamp;
37
38
    /**
39
     * @var string
40
     */
41
    protected $crdate;
42
43
    /**
44
     * @var Tx_FeatureFlag_Domain_Model_FeatureFlag
45
     */
46
    protected $featureFlag;
47
48
    /**
49
     * @var int
50
     */
51
    protected $foreignTableUid;
52
53
    /**
54
     * @var string
55
     */
56
    protected $foreignTableName;
57
58
    /**
59
     * @var int
60
     */
61
    protected $foreignTableColumn;
62
63
    /**
64
     * @var string
65
     */
66
    protected $behavior;
67
68
    /**
69
     * @param string $crdate
70
     */
71 1
    public function setCrdate($crdate)
72
    {
73 1
        $this->crdate = $crdate;
74 1
    }
75
76
    /**
77
     * @return string
78
     */
79 1
    public function getCrdate()
80
    {
81 1
        return $this->crdate;
82
    }
83
84
    /**
85
     * @param \Tx_FeatureFlag_Domain_Model_FeatureFlag $featureFlag
86
     */
87 1
    public function setFeatureFlag(Tx_FeatureFlag_Domain_Model_FeatureFlag $featureFlag)
88
    {
89 1
        $this->featureFlag = $featureFlag;
90 1
    }
91
92
    /**
93
     * @return \Tx_FeatureFlag_Domain_Model_FeatureFlag
94
     */
95 1
    public function getFeatureFlag()
96
    {
97 1
        return $this->featureFlag;
98
    }
99
100
    /**
101
     * @param int $foreignTableColumn
102
     */
103 1
    public function setForeignTableColumn($foreignTableColumn)
104
    {
105 1
        $this->foreignTableColumn = $foreignTableColumn;
106 1
    }
107
108
    /**
109
     * @return int
110
     */
111 1
    public function getForeignTableColumn()
112
    {
113 1
        return $this->foreignTableColumn;
114
    }
115
116
    /**
117
     * @param string $foreignTableName
118
     */
119 1
    public function setForeignTableName($foreignTableName)
120
    {
121 1
        $this->foreignTableName = $foreignTableName;
122 1
    }
123
124
    /**
125
     * @return string
126
     */
127 1
    public function getForeignTableName()
128
    {
129 1
        return $this->foreignTableName;
130
    }
131
132
    /**
133
     * @param int $foreignTableUid
134
     */
135 1
    public function setForeignTableUid($foreignTableUid)
136
    {
137 1
        $this->foreignTableUid = $foreignTableUid;
138 1
    }
139
140
    /**
141
     * @return int
142
     */
143 1
    public function getForeignTableUid()
144
    {
145 1
        return $this->foreignTableUid;
146
    }
147
148
    /**
149
     * @param string $tstamp
150
     */
151 1
    public function setTstamp($tstamp)
152
    {
153 1
        $this->tstamp = $tstamp;
154 1
    }
155
156
    /**
157
     * @return string
158
     */
159 1
    public function getTstamp()
160
    {
161 1
        return $this->tstamp;
162
    }
163
164
    /**
165
     * @param string $behavior
166
     */
167 1
    public function setBehavior($behavior)
168
    {
169 1
        $this->behavior = (int)$behavior;
0 ignored issues
show
Documentation Bug introduced by
The property $behavior was declared of type string, but (int) $behavior is of type integer. Maybe add a type cast?

This check looks for assignments to scalar types that may be of the wrong type.

To ensure the code behaves as expected, it may be a good idea to add an explicit type cast.

$answer = 42;

$correct = false;

$correct = (bool) $answer;
Loading history...
170 1
    }
171
172
    /**
173
     * @return string
174
     */
175 1
    public function getBehavior()
176
    {
177 1
        return (int)$this->behavior;
178
    }
179
}
180