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

Framework   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 0
Metric Value
wmc 5
lcom 1
cbo 0
dl 0
loc 32
rs 10
c 0
b 0
f 0

5 Methods

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