HeadLink   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __call() 0 7 2
1
<?php
2
3
namespace mQueue\View\Helper;
4
5
use Zend_View_Helper_HeadLink;
6
7
class HeadLink extends Zend_View_Helper_HeadLink
8
{
9
    /**
10
     * Override parent to inject the last modified time of file.
11
     * This avoid browser cache and force reloading when the file changed.
12
     *
13
     * @param string $method
14
     * @param array $args
15
     *
16
     * @return mixed
17
     */
18 12
    public function __call($method, $args)
19
    {
20 12
        if (mb_strpos($method, 'Stylesheet')) {
21 12
            $args[0] = $this->view->cacheStamp($args[0]);
22
        }
23
24 12
        return parent::__call($method, $args);
0 ignored issues
show
Bug introduced by
Are you sure the usage of parent::__call($method, $args) targeting Zend_View_Helper_HeadLink::__call() seems to always return null.

This check looks for function or method calls that always return null and whose return value is used.

class A
{
    function getObject()
    {
        return null;
    }

}

$a = new A();
if ($a->getObject()) {

The method getObject() can return nothing but null, so it makes no sense to use the return value.

The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.

Loading history...
25
    }
26
}
27