@@ -188,6 +188,9 @@ |
||
| 188 | 188 | $this->confirmEmail = strClear($confirmEmail); |
| 189 | 189 | } |
| 190 | 190 | |
| 191 | + /** |
|
| 192 | + * @param string $password |
|
| 193 | + */ |
|
| 191 | 194 | public function setPassword($password) { |
| 192 | 195 | $this->password = $password; |
| 193 | 196 | $this->passwordHash = static::encryptPassword($password); |
@@ -122,7 +122,7 @@ |
||
| 122 | 122 | |
| 123 | 123 | /** |
| 124 | 124 | * Retorna true se já existe este email no sistema |
| 125 | - * @return boolean |
|
| 125 | + * @return integer |
|
| 126 | 126 | */ |
| 127 | 127 | public function emailIsUsed() { |
| 128 | 128 | return $this->numRows(['email = ?' => $this->obj->getEmail(), 'person_id <> ?' => $this->obj->getId()]); |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | |
| 62 | 62 | /** |
| 63 | 63 | * Salva o registro |
| 64 | - * @param object $obj |
|
| 64 | + * @param \Win\Authentication\User $obj |
|
| 65 | 65 | * @return string|null |
| 66 | 66 | */ |
| 67 | 67 | public function save($obj) { |
@@ -170,7 +170,7 @@ discard block |
||
| 170 | 170 | /** |
| 171 | 171 | * Exclui o registro por id |
| 172 | 172 | * @param string $name |
| 173 | - * * @param mixed $value |
|
| 173 | + * * @param integer $value |
|
| 174 | 174 | */ |
| 175 | 175 | public function deleteByField($name, $value) { |
| 176 | 176 | $this->deleteAll([$name . ' = ?' => $value]); |
@@ -203,7 +203,7 @@ discard block |
||
| 203 | 203 | /** |
| 204 | 204 | * Busca o objeto por um campo/atributo específico |
| 205 | 205 | * @param string $name Nome do atributo |
| 206 | - * @param mixed $value Valor do atributo |
|
| 206 | + * @param integer $value Valor do atributo |
|
| 207 | 207 | */ |
| 208 | 208 | public function fetchByField($name, $value) { |
| 209 | 209 | return $this->fetch([$name . ' = ?' => $value]); |
@@ -213,6 +213,7 @@ discard block |
||
| 213 | 213 | * Busca o objeto |
| 214 | 214 | * @param string[] $filters Array de filtros |
| 215 | 215 | * @param string $option [Order by, Limit, etc] |
| 216 | + * @return \Win\Authentication\User |
|
| 216 | 217 | */ |
| 217 | 218 | public function fetch($filters, $option = 'ORDER BY 1 DESC') { |
| 218 | 219 | if (!is_array($filters)): |
@@ -299,7 +300,7 @@ discard block |
||
| 299 | 300 | |
| 300 | 301 | /** |
| 301 | 302 | * Retorna True se objeto existir |
| 302 | - * @return boolean |
|
| 303 | + * @return integer |
|
| 303 | 304 | */ |
| 304 | 305 | protected function objExists($obj) { |
| 305 | 306 | return ($this->numRows([$this->getPrimaryKey() . ' = ?' => $obj->getId()])); |
@@ -331,6 +332,9 @@ discard block |
||
| 331 | 332 | } |
| 332 | 333 | } |
| 333 | 334 | |
| 335 | + /** |
|
| 336 | + * @param string[] $filters |
|
| 337 | + */ |
|
| 334 | 338 | private function getFilterValues($filters) { |
| 335 | 339 | return array_values($filters + $this->fixedFilter); |
| 336 | 340 | } |
@@ -160,8 +160,10 @@ |
||
| 160 | 160 | function booleanToString($boolean) { |
| 161 | 161 | if ($boolean == true): |
| 162 | 162 | return 'Sim'; |
| 163 | - else: |
|
| 163 | + else { |
|
| 164 | + : |
|
| 164 | 165 | return 'Não'; |
| 166 | + } |
|
| 165 | 167 | endif; |
| 166 | 168 | } |
| 167 | 169 | |