ClearedOrder   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 22
Duplicated Lines 100 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 22
loc 22
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
use Betfair\Model\ParamInterface;
11
12 View Code Duplication
class ClearedOrder extends BetfairParamObject
13
{
14
    const API_METHOD_NAME = "listClearedOrders";
15
16
    /** @var  ParamInterface */
17
    protected $param;
18
19
    /**
20
     * @param BetfairClientInterface $betfairClient
21
     * @param AdapterInterface $adapter
22
     * @param ParamFactoryInterface $paramFactory
23
     * @param MarketFilterFactoryInterface $marketFilterFactory
24
     */
25
    public function __construct(
26
        BetfairClientInterface $betfairClient,
27
        AdapterInterface $adapter,
28
        ParamFactoryInterface $paramFactory,
29
        MarketFilterFactoryInterface $marketFilterFactory
30
    ) {
31
        parent::__construct($betfairClient, $adapter, $paramFactory, $marketFilterFactory);
32
    }
33
}
34