Completed
Push — EZP-31644 ( 2e0a1e...93bb44 )
by
unknown
19:12
created

SwapLocationSlotTest   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 22
Duplicated Lines 100 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
dl 22
loc 22
rs 10
c 0
b 0
f 0
wmc 4
lcom 0
cbo 2

4 Methods

Rating   Name   Duplication   Size   Complexity  
A setUp() 4 4 1
A createSignal() 4 4 1
A getSlotClass() 4 4 1
A getReceivedSignalClasses() 4 4 1

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
/**
4
 * This file is part of the eZ Publish Kernel package.
5
 *
6
 * @copyright Copyright (C) eZ Systems AS. All rights reserved.
7
 * @license For full copyright and license information view LICENSE file distributed with this source code.
8
 */
9
namespace eZ\Publish\Core\MVC\Symfony\Cache\Tests\Http\SignalSlot;
10
11
use eZ\Publish\Core\MVC\Symfony\Cache\Http\SignalSlot\SetContentStateSlot;
12
use eZ\Publish\Core\SignalSlot\Signal\LocationService\SwapLocationSignal;
13
14
/**
15
 * @todo Fixme
16
 */
17 View Code Duplication
class SwapLocationSlotTest extends AbstractPurgeForContentSlotTest implements SlotTest, PurgeForContentExpectation
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...
18
{
19
    public function setUp()
20
    {
21
        self::markTestIncomplete('fixme');
22
    }
23
24
    public static function createSignal()
25
    {
26
        return new SwapLocationSignal(['content1Id' => self::getContentId()]);
27
    }
28
29
    public function getSlotClass()
30
    {
31
        return SetContentStateSlot::class;
32
    }
33
34
    public static function getReceivedSignalClasses()
35
    {
36
        return [SetContentStateSignal::class];
37
    }
38
}
39