Test Failed
Push — master ( c2139f...3d9e00 )
by Paweł
56:29
created

WidgetModel::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 10
ccs 5
cts 5
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 5
nc 1
nop 0
crap 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A WidgetModel::getTypes() 0 6 1
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of the Superdesk Web Publisher Core Bundle.
7
 *
8
 * Copyright 2017 Sourcefabric z.ú. and contributors.
9
 *
10
 * For the full copyright and license information, please see the
11
 * AUTHORS and LICENSE files distributed with this source code.
12
 *
13
 * @copyright 2017 Sourcefabric z.ú
14
 * @license http://www.superdesk.org/license
15
 */
16
17
namespace SWP\Bundle\CoreBundle\Model;
18
19
use SWP\Bundle\CoreBundle\Widget\ContentListWidget;
20
use SWP\Bundle\TemplatesSystemBundle\Model\WidgetModel as BaseWidgetModel;
21
use SWP\Component\MultiTenancy\Model\TenantAwareInterface;
22
use SWP\Component\MultiTenancy\Model\TenantAwareTrait;
23
24
class WidgetModel extends BaseWidgetModel implements WidgetModelInterface, TenantAwareInterface
25
{
26
    const TYPE_LIST = 4;
27
28
    use TenantAwareTrait;
29
30 14
    /**
31
     * {@inheritdoc}
32 14
     */
33
    public function getTypes(): array
34
    {
35 14
        return parent::getTypes() + [
36
            self::TYPE_LIST => ContentListWidget::class,
37
        ];
38 14
    }
39
}
40