PriceData   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 52.63 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 0
dl 10
loc 19
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A getAll() 10 10 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
 * This file is part of the Betfair library.
4
 *
5
 * (c) Daniele D'Angeli <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
namespace Betfair\Model;
11
12
abstract class PriceData
13
{
14
    const SP_AVAILABLE = "SP_AVAILABLE";
15
    const SP_TRADED = "SP_TRADED";
16
    const EX_BEST_OFFERS = "EX_BEST_OFFERS";
17
    const EX_ALL_OFFERS = "EX_ALL_OFFERS";
18
    const EX_TRADED = "EX_TRADED";
19
20 View Code Duplication
    public static function getAll()
0 ignored issues
show
Duplication introduced by
This method 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...
21
    {
22
        return array(
23
            self::SP_AVAILABLE,
24
            self::SP_TRADED,
25
            self::EX_BEST_OFFERS,
26
            self::EX_ALL_OFFERS,
27
            self::EX_TRADED,
28
        );
29
    }
30
}
31