@@ -97,7 +97,7 @@ |
||
| 97 | 97 | * Evita chamada de um metodo que nao existe |
| 98 | 98 | * @param string $name |
| 99 | 99 | * @param mixed[] $arguments |
| 100 | - * @return boolean |
|
| 100 | + * @return boolean|null |
|
| 101 | 101 | */ |
| 102 | 102 | public function __call($name, $arguments) { |
| 103 | 103 | $this->app->pageNotFound(); |
@@ -27,7 +27,6 @@ discard block |
||
| 27 | 27 | |
| 28 | 28 | /** |
| 29 | 29 | * Cria o diretorio para salvar a imagem |
| 30 | - * @param string $pathetorio Caminho do novo diretorio |
|
| 31 | 30 | * @param int $chmod permissões deste diretório |
| 32 | 31 | * @return boolean Retora TRUE caso obtenha algum sucesso |
| 33 | 32 | */ |
@@ -56,7 +55,6 @@ discard block |
||
| 56 | 55 | |
| 57 | 56 | /** |
| 58 | 57 | * Exclui o diretorio, e os arquivos dentro dele |
| 59 | - * @param string $path |
|
| 60 | 58 | * @return boolean |
| 61 | 59 | */ |
| 62 | 60 | public function remove() { |
@@ -64,8 +64,10 @@ |
||
| 64 | 64 | if (is_dir($path)): |
| 65 | 65 | $this->removeAllFiles(); |
| 66 | 66 | return rmdir($path); |
| 67 | - else: |
|
| 67 | + else { |
|
| 68 | + : |
|
| 68 | 69 | return false; |
| 70 | + } |
|
| 69 | 71 | endif; |
| 70 | 72 | } |
| 71 | 73 | |
@@ -31,7 +31,7 @@ |
||
| 31 | 31 | * Retorna TRUE se é um diretorio |
| 32 | 32 | * @return boolean |
| 33 | 33 | */ |
| 34 | - public function exists(){ |
|
| 34 | + public function exists() { |
|
| 35 | 35 | return is_dir($this->path); |
| 36 | 36 | } |
| 37 | 37 | |
@@ -60,7 +60,7 @@ |
||
| 60 | 60 | * @return string Retorna o caminho da thumb |
| 61 | 61 | * @param int $width largura |
| 62 | 62 | * @param int $height altura |
| 63 | - * @param boolean $mode modo de corte |
|
| 63 | + * @param string|boolean $mode modo de corte |
|
| 64 | 64 | */ |
| 65 | 65 | function showThumb($width = 100, $height = 100, $mode = 'normal') { |
| 66 | 66 | return "lib/thumb/" . $mode . '/' . $width . '/' . $height . '/' . $this->__toString(); |
@@ -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 | |
@@ -66,6 +66,9 @@ discard block |
||
| 66 | 66 | $this->name = $name; |
| 67 | 67 | } |
| 68 | 68 | |
| 69 | + /** |
|
| 70 | + * @param string $tempName |
|
| 71 | + */ |
|
| 69 | 72 | public function setTempName($tempName) { |
| 70 | 73 | $this->tempName = $tempName; |
| 71 | 74 | } |
@@ -237,7 +240,6 @@ discard block |
||
| 237 | 240 | |
| 238 | 241 | /** |
| 239 | 242 | * Retorna o conteudo do arquivo |
| 240 | - * @param string $content |
|
| 241 | 243 | */ |
| 242 | 244 | public function read() { |
| 243 | 245 | return file_get_contents($this->getFullName()); |
@@ -139,6 +139,9 @@ |
||
| 139 | 139 | $this->confirmEmail = $confirmEmail; |
| 140 | 140 | } |
| 141 | 141 | |
| 142 | + /** |
|
| 143 | + * @param string $password |
|
| 144 | + */ |
|
| 142 | 145 | public function setPassword($password, $confirmPassword = null) { |
| 143 | 146 | $this->password = $password; |
| 144 | 147 | $this->confirmPassword = $confirmPassword; |
@@ -198,7 +198,7 @@ |
||
| 198 | 198 | /** @return boolean retorna TRUE se está bloqueado por tentativas de login */ |
| 199 | 199 | public function isLocked() { |
| 200 | 200 | $diff = $this->getLoginUnlockDate()->diff(new Date()); |
| 201 | - return (boolean) ($diff > 0 ); |
|
| 201 | + return (boolean) ($diff > 0); |
|
| 202 | 202 | } |
| 203 | 203 | |
| 204 | 204 | /** @return int total de tentativas restantes até ser bloqueado */ |
@@ -109,7 +109,7 @@ |
||
| 109 | 109 | |
| 110 | 110 | /** |
| 111 | 111 | * Retorna true se já existe este email no sistema |
| 112 | - * @return boolean |
|
| 112 | + * @return integer |
|
| 113 | 113 | */ |
| 114 | 114 | public function emailIsUsed() { |
| 115 | 115 | return $this->numRows(['email = ?' => $this->obj->getEmail(), 'person_id <> ?' => $this->obj->id]); |
@@ -41,6 +41,9 @@ |
||
| 41 | 41 | return (boolean) $this->year == 0; |
| 42 | 42 | } |
| 43 | 43 | |
| 44 | + /** |
|
| 45 | + * @return string |
|
| 46 | + */ |
|
| 44 | 47 | public function getMonthName() { |
| 45 | 48 | return self::$monthNames[(int) $this->month]; |
| 46 | 49 | } |
@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | |
| 100 | 100 | /** |
| 101 | 101 | * Salva o registro |
| 102 | - * @param object $obj |
|
| 102 | + * @param \Win\Authentication\User $obj |
|
| 103 | 103 | * @return string|null |
| 104 | 104 | */ |
| 105 | 105 | public function save($obj) { |
@@ -158,7 +158,6 @@ discard block |
||
| 158 | 158 | /** |
| 159 | 159 | * Exclui o registro |
| 160 | 160 | * @param object $obj |
| 161 | - * @param mixed[] $filters |
|
| 162 | 161 | */ |
| 163 | 162 | public function delete($obj) { |
| 164 | 163 | $this->obj = $obj; |
@@ -180,7 +179,7 @@ discard block |
||
| 180 | 179 | /** |
| 181 | 180 | * Exclui o registro por id |
| 182 | 181 | * @param string $name |
| 183 | - * * @param mixed $value |
|
| 182 | + * * @param integer $value |
|
| 184 | 183 | */ |
| 185 | 184 | public function deleteByField($name, $value) { |
| 186 | 185 | $this->deleteAll([$name . ' = ?' => $value]); |
@@ -252,7 +251,7 @@ discard block |
||
| 252 | 251 | /** |
| 253 | 252 | * Busca o objeto por um campo/atributo específico |
| 254 | 253 | * @param string $name Nome do atributo |
| 255 | - * @param mixed $value Valor do atributo |
|
| 254 | + * @param integer $value Valor do atributo |
|
| 256 | 255 | */ |
| 257 | 256 | public function fetchByField($name, $value) { |
| 258 | 257 | return $this->fetch([$name . ' = ?' => $value]); |
@@ -261,6 +260,7 @@ discard block |
||
| 261 | 260 | /** |
| 262 | 261 | * Busca o objeto |
| 263 | 262 | * @param string[] $filters Array de filtros |
| 263 | + * @return \Win\Authentication\User |
|
| 264 | 264 | */ |
| 265 | 265 | public function fetch($filters) { |
| 266 | 266 | $this->validateArray($filters); |
@@ -316,7 +316,7 @@ discard block |
||
| 316 | 316 | |
| 317 | 317 | /** |
| 318 | 318 | * Adiciona o array de filtros |
| 319 | - * @param mixed[] $filters |
|
| 319 | + * @param string[] $filters |
|
| 320 | 320 | */ |
| 321 | 321 | private function addFilters($filters = []) { |
| 322 | 322 | $this->filter(implode(' AND ', array_keys($filters)), $filters); |
@@ -386,6 +386,9 @@ discard block |
||
| 386 | 386 | } |
| 387 | 387 | } |
| 388 | 388 | |
| 389 | + /** |
|
| 390 | + * @param string[] $filters |
|
| 391 | + */ |
|
| 389 | 392 | private function validateArray($filters) { |
| 390 | 393 | if (!is_array($filters)): |
| 391 | 394 | throw new Exception("Filter: '{$filters}' must be a array"); |