Completed
Push — master ( 44b229...b8c9f6 )
by Stéphane
01:02
created

Framework::isLaravel()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
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