Passed
Push — master ( d8c1d6...22e31b )
by Churakov
54s queued 12s
created

ImageFormatter::format()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 3
rs 10
1
<?php
2
3
namespace ChurakovMike\EasyGrid\Formatters;
4
5
/**
6
 * Format row data in html img tag.
7
 *
8
 * Class ImageFormatter.
9
 * @package ChurakovMike\EasyGrid\Formatters
10
 */
11
class ImageFormatter extends BaseFormatter
12
{
13
    /**
14
     * Format value as image.
15
     *
16
     * @param $value
17
     * @return mixed|string
18
     */
19
    public function format($value)
20
    {
21
        return '<img src="' . $value . '"/>';
22
    }
23
}
24