ApiKeyModifier::apply()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 6
rs 9.4285
c 1
b 0
f 0
cc 1
eloc 3
nc 1
nop 0
1
<?php
2
3
/*
4
 * This file is part of GetCake PHP Client.
5
 *
6
 * (c) DraperStudio <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Apivore\GetCake\Request\Modifiers;
13
14
use Apivore\Core\Contracts\HttpClient;
15
use Apivore\Core\Request\Modifier;
16
17
class ApiKeyModifier extends Modifier
18
{
19
    public function apply()
20
    {
21
        $this->httpClient->addQuery('api_key', $this->httpClient->getConfig('apiKey'));
22
23
        return $this->httpClient;
24
    }
25
}
26