@@ -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(); |
@@ -92,7 +92,7 @@ |
||
92 | 92 | $this->app->view->validate(); |
93 | 93 | } |
94 | 94 | |
95 | - public function reload(){ |
|
95 | + public function reload() { |
|
96 | 96 | $this->init(); |
97 | 97 | $this->index(); |
98 | 98 | } |
@@ -30,7 +30,6 @@ |
||
30 | 30 | |
31 | 31 | /** |
32 | 32 | * Carrega o html do alerta |
33 | - * @param Alert $alert |
|
34 | 33 | */ |
35 | 34 | public function load() { |
36 | 35 | $block = new Block('alert/alert', ['alert' => $this]); |
@@ -165,6 +165,9 @@ discard block |
||
165 | 165 | $this->email = strClear($email); |
166 | 166 | } |
167 | 167 | |
168 | + /** |
|
169 | + * @param string $password |
|
170 | + */ |
|
168 | 171 | public function setPassword($password) { |
169 | 172 | $this->password = $password; |
170 | 173 | $this->passwordHash = static::encryptPassword($password); |
@@ -178,6 +181,9 @@ discard block |
||
178 | 181 | $this->recoreryHash = $recoreryHash; |
179 | 182 | } |
180 | 183 | |
184 | + /** |
|
185 | + * @param Date $loginDate |
|
186 | + */ |
|
181 | 187 | public function setLoginDate($loginDate) { |
182 | 188 | $this->loginDate = $loginDate; |
183 | 189 | } |
@@ -91,6 +91,9 @@ discard block |
||
91 | 91 | $this->second = $second; |
92 | 92 | } |
93 | 93 | |
94 | + /** |
|
95 | + * @return string |
|
96 | + */ |
|
94 | 97 | public function getMonthName() { |
95 | 98 | return self::$monthNames[(int) $this->month]; |
96 | 99 | } |
@@ -272,7 +275,7 @@ discard block |
||
272 | 275 | * Retorna a diferença em Segundos entre duas datas |
273 | 276 | * @param Data $date1 |
274 | 277 | * @param Data $date2 |
275 | - * @return float Diferença em Segundos |
|
278 | + * @return integer Diferença em Segundos |
|
276 | 279 | */ |
277 | 280 | public static function secondsDiff(Data $date1, Data $date2) { |
278 | 281 | $mkTime1 = mktime($date1->getHour(), $date1->getMinute(), $date1->getSecond(), $date1->getMonth(), $date1->getDay(), $date1->getYear()); |
@@ -286,7 +289,7 @@ discard block |
||
286 | 289 | * Retorna a diferença em Dias entre duas datas |
287 | 290 | * @param Data $date1 |
288 | 291 | * @param Data $date2 |
289 | - * @return float Diferença em Dias |
|
292 | + * @return integer Diferença em Dias |
|
290 | 293 | */ |
291 | 294 | public static function daysDiff(Data $date1, Data $date2) { |
292 | 295 | $diffInDay = ((self::secondsDiff($date1, $date2)) / 86400); |
@@ -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 |
@@ -64,6 +64,9 @@ |
||
64 | 64 | $this->name = $name; |
65 | 65 | } |
66 | 66 | |
67 | + /** |
|
68 | + * @param string $tempName |
|
69 | + */ |
|
67 | 70 | public function setTempName($tempName) { |
68 | 71 | $this->tempName = $tempName; |
69 | 72 | } |
@@ -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(); |
@@ -3,7 +3,7 @@ discard block |
||
3 | 3 | /** |
4 | 4 | * Autoload Model |
5 | 5 | */ |
6 | -spl_autoload_register(function ($className) { |
|
6 | +spl_autoload_register(function($className) { |
|
7 | 7 | $controllerFile = BASE_PATH . '/app/model/' . str_replace('\\', DIRECTORY_SEPARATOR, $className) . '.php'; |
8 | 8 | if (file_exists($controllerFile)): |
9 | 9 | return require $controllerFile; |
@@ -13,7 +13,7 @@ discard block |
||
13 | 13 | /** |
14 | 14 | * Autoload Controller |
15 | 15 | */ |
16 | -spl_autoload_register(function ($className) { |
|
16 | +spl_autoload_register(function($className) { |
|
17 | 17 | $modelFile = BASE_PATH . '/app/' . str_replace('\\', DIRECTORY_SEPARATOR, $className) . '.php'; |
18 | 18 | if (file_exists($modelFile)): |
19 | 19 | return require $modelFile; |
@@ -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 | } |