Passed
Push — master ( 9ff49c...6f190e )
by Bruno
15:38 queued 05:39
created

Util   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
c 1
b 0
f 0
dl 0
loc 15
rs 10
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
    public static function getLaravelVersion(): string
13
    {
14
        $laravelVersion = '7.x'; // default
15
        if (function_exists('app')) {
16
            // @phpstan-ignore-next-line
17
            $laravelVersion = app()->version();
18
        }
19
        return $laravelVersion;
20
    }
21
}
22