@@ -36,9 +36,6 @@ |
||
36 | 36 | /** |
37 | 37 | * Returns the user's gravatar url. |
38 | 38 | * @param string $email The email address |
39 | - * @param string $imageset Default imageset to use [ 404 | mm | identicon | monsterid | wavatar ] |
|
40 | - * @param string $rating Maximum rating (inclusive) [ g | pg | r | x ] |
|
41 | - * @param boole $img True to return a complete IMG tag False for just the URL |
|
42 | 39 | * @param array $options Optional, additional key/value attributes to include |
43 | 40 | * @return string Link to the user's gravatar image. |
44 | 41 | */ |
@@ -34,14 +34,14 @@ |
||
34 | 34 | const HTTPS_URL = 'https://secure.gravatar.com/avatar/'; |
35 | 35 | |
36 | 36 | /** |
37 | - * Returns the user's gravatar url. |
|
38 | - * @param string $email The email address |
|
39 | - * @param string $imageset Default imageset to use [ 404 | mm | identicon | monsterid | wavatar ] |
|
40 | - * @param string $rating Maximum rating (inclusive) [ g | pg | r | x ] |
|
41 | - * @param boole $img True to return a complete IMG tag False for just the URL |
|
42 | - * @param array $options Optional, additional key/value attributes to include |
|
43 | - * @return string Link to the user's gravatar image. |
|
44 | - */ |
|
37 | + * Returns the user's gravatar url. |
|
38 | + * @param string $email The email address |
|
39 | + * @param string $imageset Default imageset to use [ 404 | mm | identicon | monsterid | wavatar ] |
|
40 | + * @param string $rating Maximum rating (inclusive) [ g | pg | r | x ] |
|
41 | + * @param boole $img True to return a complete IMG tag False for just the URL |
|
42 | + * @param array $options Optional, additional key/value attributes to include |
|
43 | + * @return string Link to the user's gravatar image. |
|
44 | + */ |
|
45 | 45 | public static function getAvatarUrl($email, $options = []) |
46 | 46 | { |
47 | 47 | $size = isset($options['s']) ? $options['s'] : 80; |
@@ -42,14 +42,14 @@ |
||
42 | 42 | * @param array $options Optional, additional key/value attributes to include |
43 | 43 | * @return string Link to the user's gravatar image. |
44 | 44 | */ |
45 | - public static function getAvatarUrl($email, $options = []) |
|
45 | + public static function getAvatarUrl($email, $options = [ ]) |
|
46 | 46 | { |
47 | - $size = isset($options['s']) ? $options['s'] : 80; |
|
48 | - $imageset = isset($options['d']) ? $options['d'] : 'mm'; |
|
49 | - $rating = isset($options['r']) ? $options['r'] : 'g'; |
|
50 | - $secure = isset($options['secure']) ? self::HTTPS_URL : self::HTTP_URL; |
|
47 | + $size = isset($options[ 's' ]) ? $options[ 's' ] : 80; |
|
48 | + $imageset = isset($options[ 'd' ]) ? $options[ 'd' ] : 'mm'; |
|
49 | + $rating = isset($options[ 'r' ]) ? $options[ 'r' ] : 'g'; |
|
50 | + $secure = isset($options[ 'secure' ]) ? self::HTTPS_URL : self::HTTP_URL; |
|
51 | 51 | |
52 | - return $secure . md5(strtolower(trim($email))) . '?s=' . $size .'&d=' . $imageset . '&r=' . $rating; |
|
52 | + return $secure . md5(strtolower(trim($email))) . '?s=' . $size . '&d=' . $imageset . '&r=' . $rating; |
|
53 | 53 | } |
54 | 54 | } |
55 | 55 |