Util   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Test Coverage

Coverage 80%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
dl 0
loc 15
rs 10
c 1
b 0
f 0
ccs 4
cts 5
cp 0.8
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A getLaravelVersion() 0 8 2
1
<?php declare(strict_types=1);
2
3
namespace Modelarium\Laravel;
4
5
final class Util
6
{
7
    /**
8
     * Returns the Laravel version we're using.
9
     *
10
     * @return string
11
     */
12 9
    public static function getLaravelVersion(): string
13
    {
14 9
        $laravelVersion = '7.x'; // default
15 9
        if (function_exists('app')) {
16
            // @phpstan-ignore-next-line
17
            $laravelVersion = app()->version();
18
        }
19 9
        return $laravelVersion;
20
    }
21
}
22