CurrentOrder   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 100 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 8 8 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\BettingApi\Order;
4
5
use Betfair\Adapter\AdapterInterface;
6
use Betfair\BettingApi\BetfairParamObject;
7
use Betfair\Client\BetfairClientInterface;
8
use Betfair\Factory\MarketFilterFactoryInterface;
9
use Betfair\Factory\ParamFactoryInterface;
10
11 View Code Duplication
class CurrentOrder extends BetfairParamObject
12
{
13
    const API_METHOD_NAME = "listCurrentOrders";
14
15
    /**
16
     * @param BetfairClientInterface $betfairClient
17
     * @param AdapterInterface $adapter
18
     * @param ParamFactoryInterface $paramFactory
19
     * @param MarketFilterFactoryInterface $marketFilterFactory
20
     */
21
    public function __construct(
22
        BetfairClientInterface $betfairClient,
23
        AdapterInterface $adapter,
24
        ParamFactoryInterface $paramFactory,
25
        MarketFilterFactoryInterface $marketFilterFactory
26
    ) {
27
        parent::__construct($betfairClient, $adapter, $paramFactory, $marketFilterFactory);
28
    }
29
}
30