Passed
Push — master ( 12b4e1...e176ef )
by Lynh
13:05
created

array_merge_recursive_unique()   B

Complexity

Conditions 10
Paths 8

Size

Total Lines 32
Code Lines 19

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 10
eloc 19
c 1
b 0
f 0
nc 8
nop 0
dl 0
loc 32
rs 7.6666

How to fix   Complexity   

Long Method

Small methods make your code easier to understand, in particular if combined with a good name. Besides, if your method is small, finding a good name is usually much easier.

For example, if you find yourself adding comments to a method's body, this is usually a good sign to extract the commented part to a new method, and use the comment as a starting point when coming up with a good name for this new method.

Commonly applied refactorings include:

1
<?php
2
3
use Jenky\Hermes\Contracts\Hermes;
4
5
if (! function_exists('guzzle')) {
6
    /**
7
     * Get a guzzle client instance.
8
     *
9
     * @param  string|null  $channel
10
     * @param  array  $options
11
     * @return \Jenky\Hermes\Contracts\Hermes|\GuzzleHttp\Client
12
     */
13
    function guzzle($channel = null, array $options = [])
14
    {
15
        return $channel ? app(Hermes::class)->channel($channel, $options) : app(Hermes::class);
16
    }
17
}
18