Completed
Push — master ( 1fe75f...12dabe )
by Song
02:17
created

Gravatar::display()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 1
dl 0
loc 6
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Encore\Admin\Grid\Displayers;
4
5
class Gravatar extends AbstractDisplayer
6
{
7
    public function display($size = 30)
8
    {
9
        $src =  sprintf('https://www.gravatar.com/avatar/%s?s=%d', md5(strtolower($this->value)), $size);
10
11
        return "<img src='$src' class='img img-circle'/>";
12
    }
13
}
14
15