Completed
Pull Request — master (#2657)
by Jeroen
09:12
created

AbstractArticleOverviewPage   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 2
dl 0
loc 35
ccs 0
cts 6
cp 0
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
getArticleRepository() 0 1 ?
A getPossibleChildTypes() 0 4 1
A getPagePartAdminConfigurations() 0 4 1
A getDefaultView() 0 4 1
1
<?php
2
3
namespace Kunstmaan\ArticleBundle\Entity;
4
5
use Kunstmaan\ArticleBundle\PagePartAdmin\AbstractArticleOverviewPagePagePartAdminConfigurator;
6
use Kunstmaan\NodeBundle\Entity\AbstractPage;
7
use Kunstmaan\PagePartBundle\Helper\HasPagePartsInterface;
8
use Kunstmaan\PagePartBundle\PagePartAdmin\AbstractPagePartAdminConfigurator;
9
10
/**
11
 * The article overview page which shows its articles
12
 */
13
abstract class AbstractArticleOverviewPage extends AbstractPage implements HasPagePartsInterface
14
{
15
    /**
16
     * @return array
17
     */
18
    public function getPossibleChildTypes()
19
    {
20
        return array();
21
    }
22
23
    /**
24
     * @return AbstractPagePartAdminConfigurator[]
0 ignored issues
show
Documentation introduced by
Consider making the return type a bit more specific; maybe use AbstractArticleOverviewP...PartAdminConfigurator[].

This check looks for the generic type array as a return type and suggests a more specific type. This type is inferred from the actual code.

Loading history...
25
     */
26
    public function getPagePartAdminConfigurations()
27
    {
28
        return array(new AbstractArticleOverviewPagePagePartAdminConfigurator());
29
    }
30
31
    /**
32
     * Return the Article repository
33
     *
34
     * @param $em
35
     *
36
     * @return mixed
37
     */
38
    abstract public function getArticleRepository($em);
39
40
    /**
41
     * @return string
42
     */
43
    public function getDefaultView()
44
    {
45
        return '@KunstmaanArticle/AbstractArticleOverviewPage/view.html.twig';
46
    }
47
}
48