@@ -8,15 +8,15 @@ discard block |
||
| 8 | 8 | |
| 9 | 9 | namespace Core\Helpers; |
| 10 | 10 | |
| 11 | -class Hash{ |
|
| 11 | +class Hash { |
|
| 12 | 12 | /** |
| 13 | 13 | * Receives a string password and hashes it. |
| 14 | 14 | * |
| 15 | 15 | * @param string $password |
| 16 | 16 | * @return string $hash |
| 17 | 17 | */ |
| 18 | - public static function hash($password){ |
|
| 19 | - return (string)password_hash($password, PASSWORD_DEFAULT); |
|
| 18 | + public static function hash($password) { |
|
| 19 | + return (string) password_hash($password, PASSWORD_DEFAULT); |
|
| 20 | 20 | } |
| 21 | 21 | |
| 22 | 22 | /** |
@@ -26,8 +26,8 @@ discard block |
||
| 26 | 26 | * @param string $hash |
| 27 | 27 | * @return boolean If the hash was generated from the password |
| 28 | 28 | */ |
| 29 | - public static function checkHash($string, $hash){ |
|
| 30 | - if( password_verify( $string, $hash ) ){ |
|
| 29 | + public static function checkHash($string, $hash) { |
|
| 30 | + if (password_verify($string, $hash)) { |
|
| 31 | 31 | return true; |
| 32 | 32 | } |
| 33 | 33 | return false; |