Framework   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 9
c 1
b 0
f 0
dl 0
loc 30
rs 10
wmc 5

5 Methods

Rating   Name   Duplication   Size   Complexity  
A php() 0 3 1
A isLaravel() 0 3 1
A setName() 0 3 1
A laravel() 0 3 1
A isPhp() 0 3 1
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