Ip::decorate()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 1
dl 0
loc 9
rs 9.9666
c 0
b 0
f 0
1
<?php
2
3
namespace Boduch\Grid\Decorators;
4
5
use Boduch\Grid\Cell;
6
7
class Ip extends Decorator
8
{
9
    /**
10
     * @param Cell $cell
11
     * @return void
12
     */
13
    public function decorate(Cell $cell)
14
    {
15
        // disable auto escape so we can display <a> html tag in cell
16
        $cell->getColumn()->setAutoescape(false);
17
18
        $cell->setValue(
19
            $cell->getColumn()->getGrid()->getGridHelper()->getHtmlBuilder()->tag('abbr', (string) $cell->getUnescapedValue())
20
        );
21
    }
22
}
23