Passed
Push — master ( 912fa5...69a393 )
by Pedro
01:58
created

PlayerItem   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 5
dl 0
loc 10
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __invoke() 0 8 2
1
<?php
2
3
namespace Application\View\Helper;
4
5
use Zend\View\Helper\AbstractHelper;
6
7
class PlayerItem extends AbstractHelper
8
{
9
    public function __invoke(string $name, int $value, string $unique = null)
10
    {
11
        $str = '<b>' . ucfirst($name) . ':</b> ' . $value;
12
        if ($unique) {
13
            $str .= ' [<span class="unique">' . $unique . '</span>]';
14
        }
15
16
        return $str;
17
    }
18
}
19