Completed
Push — master ( 846562...c18cbd )
by Abdelrahman
02:37 queued 01:33
created

helpers.php ➔ currencies()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 1
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
use Rinvex\Country\CountryLoader;
6
use Rinvex\Country\CurrencyLoader;
7
8
if (! function_exists('country')) {
9
    /**
10
     * Get the country by it's ISO 3166-1 alpha-2.
11
     *
12
     * @param string $code
13
     * @param bool   $hydrate
14
     *
15
     * @return \Rinvex\Country\Country|array
16
     */
17
    function country($code, $hydrate = true)
18
    {
19
        return CountryLoader::country($code, $hydrate);
20
    }
21
}
22
23
if (! function_exists('countries')) {
24
    /**
25
     * Get all countries short-listed.
26
     *
27
     * @param bool $longlist
28
     * @param bool $hydrate
29
     *
30
     * @return array
31
     */
32
    function countries($longlist = false, $hydrate = false)
33
    {
34
        return CountryLoader::countries($longlist, $hydrate);
35
    }
36
}
37
38
if (! function_exists('currencies')) {
39
    /**
40
     * Get all countries short-listed.
41
     *
42
     * @param bool $longlist
43
     * @param bool $hydrate
0 ignored issues
show
Bug introduced by
There is no parameter named $hydrate. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
44
     *
45
     * @return array
46
     */
47
    function currencies($longlist = false)
48
    {
49
        return CurrencyLoader::currencies($longlist);
50
    }
51
}
52