Completed
Branch master (2d0ab0)
by Adrien
07:23
created

Rating::rating()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 1
dl 0
loc 6
ccs 3
cts 3
cp 1
crap 1
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
namespace mQueue\View\Helper;
4
5
use Zend_View_Helper_Abstract;
6
7
class Rating extends Zend_View_Helper_Abstract
8
{
9
    /**
10
     * Returns some help text about statuses for end-user
11
     * @param int $rating
12
     * @return string
13
     */
14 2
    public function rating(int $rating)
0 ignored issues
show
Coding Style Best Practice introduced by
Please use __construct() instead of a PHP4-style constructor that is named after the class.
Loading history...
15
    {
16 2
        $result = '<span class="mqueue_status current mqueue_status_' . $rating . '" title="' . \mQueue\Model\Status::$ratings[$rating] . '"><span>' . \mQueue\Model\Status::$ratings[$rating] . '</span></span>';
17
18 2
        return $result;
19
    }
20
}
21