AchievementRemoved   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 0
cbo 3
dl 0
loc 29
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __invoke() 0 6 1
A __toString() 0 12 1
1
<?php
2
/**
3
 * AchievementAwarded
4
 *
5
 * @category  AxalianAchievements\View\Helper
6
 * @package   AxalianAchievements\View\Helper
7
 * @author    Michel Maas <[email protected]>
8
 * @method    string|\Zend\View\Helper\Partial partial($name = null, $values = null)
9
 */
10
11
namespace AxalianAchievements\View\Helper;
12
13
use Zend\View\Renderer\PhpRenderer;
14
15
class AchievementRemoved extends AbstractAchievementViewHelper
16
{
17
    /**
18
     * @param string $partial
19
     * @return self
20
     */
21
    public function __invoke($partial = 'partials/axalian_achievements/achievement_removed')
22
    {
23
        $this->partial = $partial;
24
25
        return $this;
26
    }
27
28
    /**
29
     * @return string
30
     */
31
    public function __toString()
32
    {
33
        /** @var PhpRenderer $view */
34
        $view = $this->getView();
35
36
        return $view->partial(
37
            $this->partial,
38
            array(
39
                'achievements' => $this->getService()->getRemovedAchievements()
40
            )
41
        );
42
    }
43
}
44