Passed
Push — master ( be29fa...67511f )
by Pedro
02:15
created

Scoreboard::secondsToTime()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 5
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
namespace Application\View\Helper;
4
5
use Zend\View\Helper\AbstractHelper;
6
7
class Scoreboard extends AbstractHelper
8
{
9
    public function __invoke($item)
10
    {
11
        $url = $this->getView()->plugin('url');
0 ignored issues
show
Bug introduced by
The method plugin() does not exist on Zend\View\Renderer\RendererInterface. It seems like you code against a sub-type of Zend\View\Renderer\RendererInterface such as Zend\View\Renderer\PhpRenderer. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

11
        $url = $this->getView()->/** @scrutinizer ignore-call */ plugin('url');
Loading history...
12
13
        $class = '';
14
        if (! $item['status']) {
15
            $class = ' class="text-danger"';
16
        } else {
17
            $class = ' class="text-success"';
18
        }
19
        $str = '<a' . $class . ' href="' . $url('player-info', ['nick' => $item['nick']]) . '">';
20
        $str .= $item['nick'] . '</a>';
21
        $str .= ', the level ' . $item['level'] . ' ' . $item['class'] . '. ';
22
        $str .= 'Next level in ' . $item['ttl'] . '.';
23
24
        return $str;
25
    }
26
}
27