GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — master ( 37c564...56f4ad )
by Mario
01:32
created

NetgenOpenGraphExtensionTest   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 81
Duplicated Lines 76.54 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 0
Metric Value
wmc 3
c 0
b 0
f 0
lcom 0
cbo 3
dl 62
loc 81
rs 10

How to fix   Duplicated Code   

Duplicated Code

Duplicate code is one of the most pungent code smells. A rule that is often used is to re-structure code once it is duplicated in three or more places.

Common duplication problems, and corresponding solutions are:

1
<?php
2
3
namespace Netgen\Bundle\OpenGraphBundle\Tests\DependencyInjection;
4
5
use Matthias\SymfonyDependencyInjectionTest\PhpUnit\AbstractExtensionTestCase;
6
use Netgen\Bundle\OpenGraphBundle\DependencyInjection\NetgenOpenGraphExtension;
7
8
class NetgenOpenGraphExtensionTest extends AbstractExtensionTestCase
9
{
10
    /**
11
     * @doesNotPerformAssertions
12
     */
13
    public function testItSetsValidContainerParameters()
14
    {
15
        $this->container->setParameter('ezpublish.siteaccess.list', array());
16
        $this->load();
17
    }
18
19
    protected function getContainerExtensions()
20
    {
21
        return array(
22
            new NetgenOpenGraphExtension(),
23
        );
24
    }
25
26
    protected function getMinimalConfiguration()
27
    {
28
        return array(
29
            'system' => array(
30
                'default' => array(
31
                    'content_type_handlers' => array(
32
                        'content_type_one' => array(
33
                            array(
34
                                'handler' => 'literal/text',
35
                                'tag' => 'og:type',
36
                                'params' => array(
37
                                    'one',
38
                                    'two',
39
                                    'three',
40
                                ),
41
                            ),
42
                            array(
43
                                'handler' => 'field_type/ezstring',
44
                                'tag' => 'og:title',
45
                                'params' => array(
46
                                    'one',
47
                                    'two',
48
                                    'three',
49
                                ),
50
                            ),
51
                        ),
52
                        'content_type_two' => array(
53
                            array(
54
                                'handler' => 'field_type/ezstring',
55
                                'tag' => 'og:title',
56
                                'params' => array(
57
                                    'one',
58
                                    'two',
59
                                    'three',
60
                                ),
61
                            ),
62
                        ),
63
                    ),
64
                    'global_handlers' => array(
65
                        array(
66
                            'handler' => 'literal/text',
67
                            'tag' => 'og:type',
68
                            'params' => array(
69
                                'one',
70
                                'two',
71
                                'three',
72
                            ),
73
                        ),
74
                        array(
75
                            'handler' => 'field_type/ezstring',
76
                            'tag' => 'og:title',
77
                            'params' => array(
78
                                'one',
79
                                'two',
80
                                'three',
81
                            ),
82
                        ),
83
                    ),
84
                ),
85
            ),
86
        );
87
    }
88
}
89