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

Gravatar   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 9
rs 10
c 0
b 0
f 0
wmc 1
lcom 1
cbo 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A display() 0 6 1
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