@@ -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]); |
@@ -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 |
@@ -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; |
@@ -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()); |
@@ -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()); |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | |
67 | 67 | /** |
68 | 68 | * Salva o registro |
69 | - * @param object $obj |
|
69 | + * @param \Win\Authentication\User $obj |
|
70 | 70 | * @return string|null |
71 | 71 | */ |
72 | 72 | public function save($obj) { |
@@ -155,7 +155,6 @@ discard block |
||
155 | 155 | /** |
156 | 156 | * Exclui o registro |
157 | 157 | * @param object $obj |
158 | - * @param mixed[] $filters |
|
159 | 158 | */ |
160 | 159 | public function delete($obj) { |
161 | 160 | $this->obj = $obj; |
@@ -176,7 +175,7 @@ discard block |
||
176 | 175 | /** |
177 | 176 | * Exclui o registro por id |
178 | 177 | * @param string $name |
179 | - * * @param mixed $value |
|
178 | + * * @param integer $value |
|
180 | 179 | */ |
181 | 180 | public function deleteByField($name, $value) { |
182 | 181 | $this->deleteAll([$name . ' = ?' => $value]); |
@@ -209,7 +208,7 @@ discard block |
||
209 | 208 | /** |
210 | 209 | * Busca o objeto por um campo/atributo específico |
211 | 210 | * @param string $name Nome do atributo |
212 | - * @param mixed $value Valor do atributo |
|
211 | + * @param integer $value Valor do atributo |
|
213 | 212 | */ |
214 | 213 | public function fetchByField($name, $value) { |
215 | 214 | return $this->fetch([$name . ' = ?' => $value]); |
@@ -219,6 +218,7 @@ discard block |
||
219 | 218 | * Busca o objeto |
220 | 219 | * @param string[] $filters Array de filtros |
221 | 220 | * @param string $option [Order by, Group by, etc] |
221 | + * @return \Win\Authentication\User |
|
222 | 222 | */ |
223 | 223 | public function fetch($filters, $option = 'ORDER BY 1 DESC') { |
224 | 224 | if (!is_array($filters)): |
@@ -338,6 +338,9 @@ discard block |
||
338 | 338 | } |
339 | 339 | } |
340 | 340 | |
341 | + /** |
|
342 | + * @param string[] $filters |
|
343 | + */ |
|
341 | 344 | private function getFilterValues($filters) { |
342 | 345 | return array_values($filters + $this->fixedFilters); |
343 | 346 | } |