google_distance()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 1
Metric Value
cc 1
eloc 1
c 2
b 0
f 1
nc 1
nop 3
dl 0
loc 3
rs 10
1
<?php
2
3
use Pnlinh\GoogleDistance\Facades\GoogleDistance;
4
5
if (!function_exists('google_distance')) {
6
    /**
7
     * Helper function.
8
     *
9
     * @param string      $origins
10
     * @param string      $destinations
11
     * @param string|null $overrideUnits
12
     *
13
     * @return int
14
     */
15
    function google_distance(string $origins, string $destinations, ?string $overrideUnits = null): int
16
    {
17
        return GoogleDistance::calculate($origins, $destinations, $overrideUnits);
0 ignored issues
show
Bug introduced by
The method calculate() does not exist on Pnlinh\GoogleDistance\Facades\GoogleDistance. Since you implemented __callStatic, consider adding a @method annotation. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

17
        return GoogleDistance::/** @scrutinizer ignore-call */ calculate($origins, $destinations, $overrideUnits);
Loading history...
18
    }
19
}
20