Import::buildMenu()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 7
Ratio 100 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 0
Metric Value
dl 7
loc 7
ccs 5
cts 5
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 4
nc 1
nop 1
crap 1
1
<?php
2
/**
3
 * AnimeDb package.
4
 *
5
 * @author    Peter Gribanov <[email protected]>
6
 * @copyright Copyright (c) 2011, Peter Gribanov
7
 * @license   http://opensource.org/licenses/GPL-3.0 GPL v3
8
 */
9
10
namespace AnimeDb\Bundle\CatalogBundle\Plugin\Import;
11
12
use AnimeDb\Bundle\CatalogBundle\Plugin\Plugin;
13
use Knp\Menu\ItemInterface;
14
15
/**
16
 * Plugin import.
17
 *
18
 * @author  Peter Gribanov <[email protected]>
19
 */
20
abstract class Import extends Plugin implements ImportInterface
0 ignored issues
show
Deprecated Code introduced by
The class AnimeDb\Bundle\CatalogBundle\Plugin\Plugin has been deprecated with message: use PluginInterface

This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the type will be removed from the class and what other constant to use instead.

Loading history...
21
{
22
    /**
23
     * @param ItemInterface $item
24
     *
25
     * @return ItemInterface
26
     */
27 1 View Code Duplication
    public function buildMenu(ItemInterface $item)
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
28
    {
29 1
        return $item->addChild($this->getTitle(), [
30 1
            'route' => 'item_import',
31 1
            'routeParameters' => ['plugin' => $this->getName()],
32 1
        ]);
33
    }
34
}
35