Link   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
eloc 4
dl 0
loc 16
ccs 0
cts 5
cp 0
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A link() 0 6 2
1
<?php
2
3
namespace mQueue\View\Helper;
4
5
use Zend_View_Helper_Abstract;
6
7
class Link extends Zend_View_Helper_Abstract
8
{
9
    /**
10
     * Create a link to IMDb page for specified movie.
11
     *
12
     * @param \mQueue\Model\Movie $movie
13
     * @param bool $showUrl
14
     *
15
     * @return string
16
     */
17
    public function link(\mQueue\Model\Movie $movie, $showUrl = false): string
18
    {
19
        $url = $movie->getImdbUrl();
20
        $result = '<a class="imdb' . ($showUrl ? '' : ' hideUrl') . '" title="' . $url . '" href="' . $url . '"><span>&nbsp;' . $url . '</span></a>';
21
22
        return $result;
23
    }
24
}
25