Completed
Push — master ( 34ea5b...e94df2 )
by Pascal
13:41
created

Client   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 1
c 1
b 0
f 1
lcom 0
cbo 1
dl 0
loc 25
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 12 1
1
<?php
2
namespace Atog\PHPokemon;
3
4
use Atog\Api\Client as AbstractClient;
5
use Atog\PHPokemon\Endpoints;
6
use \Atog\PHPokemon\Models;
7
8
/**
9
 * Class Client
10
 * @package Atog\PHPokemon
11
 */
12
class Client extends AbstractClient
13
{
14
    /**
15
     * @var string
16
     */
17
    protected $domain = 'http://pokeapi.co/api/v1';
18
19
    /**
20
     * Client constructor.
21
     * @param array $endpoints
22
     * @param array $config
23
     */
24
    public function __construct(array $endpoints = [], array $config = [])
25
    {
26
        $defaultEndpoints = [
27
            Endpoints\Pokedex::class
28
        ];
29
        $models = [
30
            'Pokedex' => Models\Pokedex::class
31
        ];
32
33
        $config['models'] = $models;
34
        parent::__construct(array_merge($defaultEndpoints, $endpoints), $config);
35
    }
36
}
37