GroupBy   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
namespace Betfair\Model;
4
5
/**
6
 * EVENT_TYPE
7
A roll up of settled P&L, commission paid and number of bet orders, on a specified event type
8
EVENT
9
A roll up of settled P&L, commission paid and number of bet orders, on a specified event
10
MARKET
11
A roll up of settled P&L, commission paid and number of bet orders, on a specified market
12
SIDE
13
An averaged roll up of settled P&L, and number of bets, on the specified side of a specified selection within a specified market, that are either settled or voided
14
BET
15
The P&L, commission paid, side and regulatory information etc, about each individual bet order
16
 * Class GroupBy
17
 * @package Betfair\Model
18
 */
19
abstract class GroupBy
20
{
21
    const EVENT_TYPE = "EVENT_TYPE";
22
    const EVENT = "EVENT";
23
    const MARKET = "MARKET";
24
    const SIDE = "SIDE";
25
    const BET = "BET";
26
27 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...
28
    {
29
        return array(
30
            self::EVENT_TYPE,
31
            self::EVENT,
32
            self::MARKET,
33
            self::SIDE,
34
            self::BET
35
        );
36
    }
37
}
38