Competition   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
 * 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\BettingApi\Competition;
11
12
use Betfair\Adapter\AdapterInterface;
13
use Betfair\BettingApi\BetfairMarketFilterObject;
14
use Betfair\Client\BetfairClientInterface;
15
use Betfair\Factory\MarketFilterFactoryInterface;
16
use Betfair\Factory\ParamFactoryInterface;
17
18
/**
19
 * Class Competition
20
 * @package Betfair\BettingApi\Competition
21
 */
22 View Code Duplication
class Competition extends BetfairMarketFilterObject
23
{
24
    const API_METHOD_NAME = "listCompetitions";
25
26
    /**
27
     * @param BetfairClientInterface $betfairClient
28
     * @param AdapterInterface $adapter
29
     * @param \Betfair\Factory\ParamFactory|\Betfair\Factory\ParamFactoryInterface $paramFactory
30
     * @param \Betfair\Factory\MarketFilterFactory|\Betfair\Factory\MarketFilterFactoryInterface $marketFilterFactory
31
     */
32
    public function __construct(
33
        BetfairClientInterface $betfairClient,
34
        AdapterInterface $adapter,
35
        ParamFactoryInterface $paramFactory,
36
        MarketFilterFactoryInterface $marketFilterFactory
37
    ) {
38
        parent::__construct($betfairClient, $adapter, $paramFactory, $marketFilterFactory);
39
    }
40
}
41