PHPDoc and code formatting changes

This commit is contained in:
James Brooks
2014-12-20 20:40:48 +00:00
parent 3790ae240e
commit 5eab8093e7
10 changed files with 52 additions and 14 deletions
+10 -2
View File
@@ -6,7 +6,6 @@ use Illuminate\Auth\Reminders\RemindableTrait;
use Illuminate\Auth\Reminders\RemindableInterface;
class User extends Eloquent implements UserInterface, RemindableInterface {
use UserTrait, RemindableTrait;
/**
@@ -37,8 +36,17 @@ class User extends Eloquent implements UserInterface, RemindableInterface {
$this->attributes['password'] = Hash::make($password);
}
/**
* Returns a Gravatar URL for the users email address.
* @param integer $size
* @return string
*/
public function getGravatarAttribute($size = 200) {
return 'https://www.gravatar.com/avatar/' . md5($this->email) . '?size=' . $size;
return sprintf(
'https://www.gravatar.com/avatar/%s?size=%d',
md5($this->email),
$size
);
}
}