AbstractApi   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 5
c 1
b 0
f 0
dl 0
loc 13
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A call() 0 6 1
1
<?php
2
declare(strict_types=1);
3
4
namespace Eekes\VblApi\Api;
5
6
use GuzzleHttp\Client;
7
8
abstract class AbstractApi
9
{
10
    const BASE_URL = 'http://vblcb.wisseq.eu/VBLCB_WebService/data/';
11
12
    /**
13
     * @return array|\stdClass[]
14
     */
15
    protected function call(string $url): array
16
    {
17
        $client = new Client(['base_uri' => self:: BASE_URL]);
18
        $response = $client->get($url);
19
20
        return json_decode($response->getBody()->getContents());
21
    }
22
}