Framework::laravel()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
3
namespace StephaneCoinon\SendGridActivity\Integrations;
4
5
class Framework
6
{
7
    const PHP = 'PHP';
8
    const LARAVEL = 'Laravel';
9
10
    protected static $name = 'PHP';
11
12
    public static function setName(string $name)
13
    {
14
        static::$name = $name;
15
    }
16
17
    public static function php()
18
    {
19
        static::setName(static::PHP);
20
    }
21
22
    public static function isPhp(): bool
23
    {
24
        return static::$name == static::PHP;
25
    }
26
27
    public static function laravel()
28
    {
29
        static::setName(static::LARAVEL);
30
    }
31
32
    public static function isLaravel(): bool
33
    {
34
        return static::$name == static::LARAVEL;
35
    }
36
}
37