Completed
Push — master ( 0ecd6b...9f36b3 )
by Tim
03:56
created

ListViewHelper::initializeArguments()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 0
1
<?php
2
/**
3
 * Link to the list.
4
 */
5
namespace HDNET\Calendarize\ViewHelpers\Link;
6
7
/**
8
 * Link to the list.
9
 */
10
class ListViewHelper extends AbstractLinkViewHelper
11
{
12
    /**
13
     * Init arguments
14
     */
15
    public function initializeArguments()
16
    {
17
        parent::initializeArguments();
18
        $this->registerArgument('pageUid', 'int', '', false, 0);
19
    }
20
21
    /**
22
     * Render the link to the given list.
23
     *
24
     * @return string
25
     */
26
    public function render()
27
    {
28
        return parent::renderLink($this->getPageUid($this->arguments['pageUid'], 'listPid'));
0 ignored issues
show
Comprehensibility Bug introduced by
It seems like you call parent on a different method (renderLink() instead of render()). Are you sure this is correct? If so, you might want to change this to $this->renderLink().

This check looks for a call to a parent method whose name is different than the method from which it is called.

Consider the following code:

class Daddy
{
    protected function getFirstName()
    {
        return "Eidur";
    }

    protected function getSurName()
    {
        return "Gudjohnsen";
    }
}

class Son
{
    public function getFirstName()
    {
        return parent::getSurname();
    }
}

The getFirstName() method in the Son calls the wrong method in the parent class.

Loading history...
29
    }
30
}
31