Completed
Push — master ( 15d27a...559485 )
by Mr
04:51
created

ClientWrapper::getClient()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 7
ccs 0
cts 4
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 2
1
<?php
2
3
namespace RouterOS\Laravel;
4
5
use RouterOS\Client;
6
7
class ClientWrapper
8
{
9
    /**
10
     * @param array $params
11
     *
12
     * @return \RouterOS\Client
13
     * @throws \RouterOS\Exceptions\ClientException
14
     * @throws \RouterOS\Exceptions\ConfigException
15
     * @throws \RouterOS\Exceptions\QueryException
16
     */
17
    public function getClient(array $params = []): Client
18
    {
19
        $configs = config('routeros-api');
20
        $configs = array_merge($configs, $params);
21
22
        return new Client($configs);
23
    }
24
}