1 | <?php |
||
21 | abstract class Model implements ModelInterface |
||
22 | { |
||
23 | /** |
||
24 | * @var bool |
||
25 | */ |
||
26 | protected $_isNew = true; |
||
27 | |||
28 | /** |
||
29 | * @var bool |
||
30 | */ |
||
31 | protected $_isModified = false; |
||
32 | |||
33 | /** |
||
34 | * @var bool |
||
35 | */ |
||
36 | protected $_isDeleted = false; |
||
37 | |||
38 | /** |
||
39 | * @var TableMapInterface |
||
40 | */ |
||
41 | protected $tableMap; |
||
42 | |||
43 | |||
44 | /** |
||
45 | * @param \PDO $con |
||
|
|||
46 | * |
||
47 | * @return bool |
||
48 | * |
||
49 | * @throws \Exception |
||
50 | */ |
||
51 | 7 | public function save(\PDO $con = null) |
|
86 | |||
87 | /** |
||
88 | * @param \PDO $con |
||
89 | * |
||
90 | * @return bool |
||
91 | * |
||
92 | * @throws \Exception |
||
93 | */ |
||
94 | 4 | public function delete(\PDO $con = null) |
|
125 | |||
126 | /** |
||
127 | * @param \PDO $con |
||
128 | * |
||
129 | * @return bool |
||
130 | */ |
||
131 | 7 | protected function preSave(\PDO $con) |
|
135 | |||
136 | /** |
||
137 | * @param \PDO $con |
||
138 | * |
||
139 | * @return bool |
||
140 | */ |
||
141 | 5 | protected function postSave(\PDO $con) |
|
145 | |||
146 | /** |
||
147 | * @param \PDO $con |
||
148 | * |
||
149 | * @return bool |
||
150 | */ |
||
151 | 3 | protected function preDelete(\PDO $con) |
|
155 | |||
156 | /** |
||
157 | * @param \PDO $con |
||
158 | * |
||
159 | * @return bool |
||
160 | */ |
||
161 | 2 | protected function postDelete(\PDO $con) |
|
165 | |||
166 | /** |
||
167 | * @return TableMapInterface |
||
168 | */ |
||
169 | 4 | protected function getTableMap() |
|
177 | |||
178 | /** |
||
179 | * @param \PDO $con |
||
180 | * |
||
181 | * @return void |
||
182 | */ |
||
183 | protected abstract function doInsert(\PDO $con); |
||
184 | |||
185 | /** |
||
186 | * @param \PDO $con |
||
187 | * |
||
188 | * @return void |
||
189 | */ |
||
190 | protected abstract function doUpdate(\PDO $con); |
||
191 | |||
192 | /** |
||
193 | * @param \PDO $con |
||
194 | * |
||
195 | * @return void |
||
196 | */ |
||
197 | protected abstract function doDelete(\PDO $con); |
||
198 | } |
||
199 |
This check looks for
@param
annotations where the type inferred by our type inference engine differs from the declared type.It makes a suggestion as to what type it considers more descriptive.
Most often this is a case of a parameter that can be null in addition to its declared types.