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

ClientWrapper   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 18
ccs 0
cts 4
cp 0
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A getClient() 0 7 1
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
}