RelationViewHelper   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A render() 0 4 1
1
<?php
2
/**
3
 * Relation view helper
4
 */
5
6
namespace HDNET\Tagger\ViewHelpers;
7
8
use HDNET\Tagger\Domain\Model\Tag;
9
use TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper;
10
11
/**
12
 * RelationViewHelper
13
 */
14
class RelationViewHelper extends AbstractViewHelper
15
{
16
17
    /**
18
     * Relation service
19
     *
20
     * @var \HDNET\Tagger\Service\RelationService
21
     * @inject
22
     */
23
    protected $relationService;
24
25
    /**
26
     * Return an array with the usage of the given tag
27
     *
28
     * @param Tag $tag
29
     *
30
     * @return array
31
     */
32
    public function render(Tag $tag)
33
    {
34
        return $this->relationService->getUsageByTag($tag);
35
    }
36
}
37