Rating::rating()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 2
c 1
b 0
f 0
dl 0
loc 5
ccs 3
cts 3
cp 1
rs 10
cc 1
nc 1
nop 1
crap 1
1
<?php
2
3
namespace mQueue\View\Helper;
4
5
use mQueue\Model\Status;
6
use Zend_View_Helper_Abstract;
7
8
class Rating extends Zend_View_Helper_Abstract
9
{
10
    /**
11
     * Returns some help text about statuses for end-user
12
     *
13
     * @param int $rating
14
     *
15
     * @return string
16
     */
17 2
    public function rating(int $rating)
18
    {
19 2
        $result = '<span class="mqueue_status current mqueue_status_' . $rating . '" title="' . Status::$ratings[$rating] . '"><span>' . Status::$ratings[$rating] . '</span></span>';
20
21 2
        return $result;
22
    }
23
}
24