@@ -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(); |
@@ -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 | $file = BASE_PATH . '/app/model/' . str_replace('\\', DIRECTORY_SEPARATOR, $className) . '.php'; |
8 | 8 | if (file_exists($file)): |
9 | 9 | return require $file; |
@@ -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 | $file = BASE_PATH . '/app/' . str_replace('\\', DIRECTORY_SEPARATOR, $className) . '.php'; |
18 | 18 | if (file_exists($file)): |
19 | 19 | return require $file; |
@@ -154,6 +154,9 @@ |
||
154 | 154 | $this->email = $email; |
155 | 155 | } |
156 | 156 | |
157 | + /** |
|
158 | + * @param string $password |
|
159 | + */ |
|
157 | 160 | public function setPassword($password) { |
158 | 161 | $this->password = $password; |
159 | 162 | $this->passwordHash = md5($password); |
@@ -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]); |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | |
68 | 68 | /** |
69 | 69 | * Salva o registro |
70 | - * @param object $obj |
|
70 | + * @param \Win\Authentication\User $obj |
|
71 | 71 | * @return string|null |
72 | 72 | */ |
73 | 73 | public function save($obj) { |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | |
119 | 119 | /** |
120 | 120 | * Exclui o registro |
121 | - * @param object $obj |
|
121 | + * @param \Win\Authentication\User $obj |
|
122 | 122 | */ |
123 | 123 | public function delete($obj) { |
124 | 124 | $this->deleteById($obj->getId()); |
@@ -148,7 +148,7 @@ discard block |
||
148 | 148 | /** |
149 | 149 | * Busca o objeto por um campo/atributo específico |
150 | 150 | * @param string $name Nome do atributo |
151 | - * @param mixed $value Valor do atributo |
|
151 | + * @param integer $value Valor do atributo |
|
152 | 152 | */ |
153 | 153 | public function fetchByField($name, $value) { |
154 | 154 | return $this->fetch([$name . ' = ?' => $value]); |
@@ -158,6 +158,7 @@ discard block |
||
158 | 158 | * Busca o objeto |
159 | 159 | * @param string[] $filters Array de filtros |
160 | 160 | * @param string $option [Order by, Limit, etc] |
161 | + * @return \Win\Authentication\User |
|
161 | 162 | */ |
162 | 163 | public function fetch($filters, $option = '') { |
163 | 164 | if (!is_array($filters)): |
@@ -89,7 +89,7 @@ |
||
89 | 89 | * @return User |
90 | 90 | */ |
91 | 91 | public function getUser() { |
92 | - if(is_null($this->user)): |
|
92 | + if (is_null($this->user)): |
|
93 | 93 | $this->user = User::getCurrentUser(); |
94 | 94 | endif; |
95 | 95 | return $this->user; |
@@ -10,15 +10,15 @@ |
||
10 | 10 | |
11 | 11 | class Checkbox { |
12 | 12 | |
13 | - /** |
|
14 | - * Retorna checked="true" se os valores são iguais |
|
15 | - * @param mixed $value1 |
|
16 | - * @param mixed $value2 |
|
17 | - */ |
|
18 | - public static function active($value1, $value2 = true) { |
|
19 | - if ($value1 == $value2) { |
|
20 | - return 'checked="true"'; |
|
21 | - } |
|
22 | - } |
|
13 | + /** |
|
14 | + * Retorna checked="true" se os valores são iguais |
|
15 | + * @param mixed $value1 |
|
16 | + * @param mixed $value2 |
|
17 | + */ |
|
18 | + public static function active($value1, $value2 = true) { |
|
19 | + if ($value1 == $value2) { |
|
20 | + return 'checked="true"'; |
|
21 | + } |
|
22 | + } |
|
23 | 23 | |
24 | 24 | } |