Conditions | 2 |
Paths | 2 |
Total Lines | 12 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
63 | public function toArray() |
||
64 | { |
||
65 | $value = $this->getModelValue(); |
||
66 | if (! empty($value)) { |
||
67 | $value = md5(strtolower(trim($value))).'?'; |
||
68 | } else { |
||
69 | $value = '205e460b479e2e5b48aec07710c08d50?f=y'; |
||
70 | } |
||
71 | |||
72 | return parent::toArray() + [ |
||
73 | 'value' => sprintf('https://www.gravatar.com/avatar/%s&size=%s&rating=%s', $value, $this->size, |
||
74 | $this->rating), |
||
75 | ]; |
||
78 |