Setting   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 0%

Importance

Changes 4
Bugs 0 Features 2
Metric Value
wmc 3
c 4
b 0
f 2
lcom 0
cbo 2
dl 0
loc 29
ccs 0
cts 13
cp 0
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getName() 0 4 1
A getTitle() 0 4 1
A buildMenu() 0 5 1
1
<?php
2
/**
3
 * AnimeDb package
4
 *
5
 * @package   AnimeDb
6
 * @author    Peter Gribanov <[email protected]>
7
 * @copyright Copyright (c) 2011, Peter Gribanov
8
 * @license   http://opensource.org/licenses/GPL-3.0 GPL v3
9
 */
10
11
namespace AnimeDb\Bundle\MyAnimeListSyncBundle\Service;
12
13
use AnimeDb\Bundle\CatalogBundle\Plugin\Setting\Setting as SettingPlugin;
14
use Knp\Menu\ItemInterface;
15
16
/**
17
 * Setting plugin
18
 *
19
 * @package AnimeDb\Bundle\MyAnimeListSyncBundle\Service
20
 * @author  Peter Gribanov <[email protected]>
21
 */
22
class Setting extends SettingPlugin
23
{
24
    /**
25
     * @return string
26
     */
27
    public function getName()
28
    {
29
        return 'my-anime-list';
30
    }
31
32
    /**
33
     * @return string
34
     */
35
    public function getTitle()
36
    {
37
        return 'MyAnimeList Sync';
38
    }
39
40
    /**
41
     * @param ItemInterface $item
42
     *
43
     * @return ItemInterface
44
     */
45
    public function buildMenu(ItemInterface $item)
46
    {
47
        $item->addChild('MyAnimeList', ['route' => 'my_anime_list_sync_settings'])
48
            ->setLinkAttribute('class', 'icon-label icon-label-plugin-my-anime-list');
49
    }
50
}
51