PlayerItem   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __invoke() 0 8 2
1
<?php
2
3
namespace Application\View\Helper;
4
5
use Laminas\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