@@ -148,7 +148,7 @@ discard block |
||
| 148 | 148 | |
| 149 | 149 | /** |
| 150 | 150 | * Exclui o registro |
| 151 | - * @param object $obj |
|
| 151 | + * @param \Win\Authentication\User $obj |
|
| 152 | 152 | */ |
| 153 | 153 | public function delete($obj) { |
| 154 | 154 | $this->deleteById($obj->getId()); |
@@ -165,7 +165,7 @@ discard block |
||
| 165 | 165 | /** |
| 166 | 166 | * Exclui o registro por id |
| 167 | 167 | * @param string $name |
| 168 | - * * @param mixed $value |
|
| 168 | + * * @param integer $value |
|
| 169 | 169 | */ |
| 170 | 170 | public function deleteByField($name, $value) { |
| 171 | 171 | $sql = 'DELETE FROM ' . static::TABLE . ' WHERE ' . $name . ' = :value'; |
@@ -188,7 +188,7 @@ discard block |
||
| 188 | 188 | /** |
| 189 | 189 | * Busca o objeto por um campo/atributo específico |
| 190 | 190 | * @param string $name Nome do atributo |
| 191 | - * @param mixed $value Valor do atributo |
|
| 191 | + * @param integer $value Valor do atributo |
|
| 192 | 192 | */ |
| 193 | 193 | public function fetchByField($name, $value) { |
| 194 | 194 | return $this->fetch([$name . ' = ?' => $value]); |
@@ -198,6 +198,7 @@ discard block |
||
| 198 | 198 | * Busca o objeto |
| 199 | 199 | * @param string[] $filters Array de filtros |
| 200 | 200 | * @param string $option [Order by, Limit, etc] |
| 201 | + * @return \Win\Authentication\User |
|
| 201 | 202 | */ |
| 202 | 203 | public function fetch($filters, $option = 'ORDER BY 1 DESC') { |
| 203 | 204 | if (!is_array($filters)): |
@@ -318,6 +319,9 @@ discard block |
||
| 318 | 319 | } |
| 319 | 320 | } |
| 320 | 321 | |
| 322 | + /** |
|
| 323 | + * @param string[] $filters |
|
| 324 | + */ |
|
| 321 | 325 | private function getFilterValues($filters) { |
| 322 | 326 | return array_values($filters + $this->fixedFilter); |
| 323 | 327 | } |
@@ -135,7 +135,7 @@ discard block |
||
| 135 | 135 | return Input::server('SERVER_NAME', FILTER_SANITIZE_STRING); |
| 136 | 136 | } |
| 137 | 137 | |
| 138 | - /** @return bolean */ |
|
| 138 | + /** @return boolean */ |
|
| 139 | 139 | public function isLocalHost() { |
| 140 | 140 | $localAddress = ['localhost', '127.0.0.1', '::1', null]; |
| 141 | 141 | return (in_array($this->getServerName(), $localAddress) || strpos($this->getServerName(), '192.168') !== false); |
@@ -234,7 +234,6 @@ discard block |
||
| 234 | 234 | |
| 235 | 235 | /** |
| 236 | 236 | * Atualiza a mesma página |
| 237 | - * @param string $url |
|
| 238 | 237 | */ |
| 239 | 238 | public function refresh() { |
| 240 | 239 | Url::instance()->redirect($this->getUrl()); |