Completed
Push — master ( 06c1ce...67d37c )
by Jeroen
06:20
created

getContext()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 4
Ratio 100 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 4
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 1
1
<?php
2
3
namespace Kunstmaan\ArticleBundle\PagePartAdmin;
4
5
use Kunstmaan\PagePartBundle\PagePartAdmin\AbstractPagePartAdminConfigurator;
6
7
/**
8
 * The PagePartAdminConfigurator for the AbstractArticleOverviewPage
9
 */
10 View Code Duplication
class AbstractArticleOverviewPagePagePartAdminConfigurator extends AbstractPagePartAdminConfigurator
0 ignored issues
show
Duplication introduced by
This class 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...
11
{
12
    /**
13
     * @var array
14
     */
15
    protected $pagePartTypes;
16
17
    /**
18
     * @param array $pagePartTypes
19
     */
20 2
    public function __construct(array $pagePartTypes = array())
21
    {
22 2
        $this->pagePartTypes = array_merge(
23
            array(
24
                array(
25 2
                    'name' => 'Header',
26
                    'class' => 'Kunstmaan\PagePartBundle\Entity\HeaderPagePart',
27
                ),
28
                array(
29
                    'name' => 'Text',
30
                    'class' => 'Kunstmaan\PagePartBundle\Entity\TextPagePart',
31
                ),
32
                array(
33
                    'name' => 'Line',
34
                    'class' => 'Kunstmaan\PagePartBundle\Entity\LinePagePart',
35
                ),
36
                array(
37
                    'name' => 'TOC',
38
                    'class' => 'Kunstmaan\PagePartBundle\Entity\TocPagePart',
39
                ),
40
                array(
41
                    'name' => 'Link',
42
                    'class' => 'Kunstmaan\PagePartBundle\Entity\LinkPagePart',
43
                ),
44
                array(
45
                    'name' => 'To Top',
46
                    'class' => 'Kunstmaan\PagePartBundle\Entity\ToTopPagePart',
47
                ),
48
                array(
49
                    'name' => 'Image',
50
                    'class' => 'Kunstmaan\MediaPagePartBundle\Entity\ImagePagePart',
51
                ),
52
                array(
53
                    'name' => 'Download',
54
                    'class' => 'Kunstmaan\MediaPagePartBundle\Entity\DownloadPagePart',
55
                ),
56
                array(
57
                    'name' => 'Slide',
58
                    'class' => 'Kunstmaan\MediaPagePartBundle\Entity\SlidePagePart',
59
                ),
60
                array(
61
                    'name' => 'Video',
62
                    'class' => 'Kunstmaan\MediaPagePartBundle\Entity\VideoPagePart',
63
                ),
64
            ), $pagePartTypes
65
        );
66 2
    }
67
68
    /**
69
     * @return array
70
     */
71 1
    public function getPossiblePagePartTypes()
72
    {
73 1
        return $this->pagePartTypes;
74
    }
75
76
    /**
77
     * @return string
78
     */
79 1
    public function getName()
80
    {
81 1
        return 'Page parts';
82
    }
83
84
    /**
85
     * @return string
86
     */
87 1
    public function getContext()
88
    {
89 1
        return 'main';
90
    }
91
92
    /**
93
     * @return string
94
     */
95 1
    public function getWidgetTemplate()
96
    {
97 1
        return '';
98
    }
99
}
100