Completed
Push — master ( 5cf284...830bc1 )
by Tomáš
03:38
created

LegacyCompatibilityLayer   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Test Coverage

Coverage 42.86%

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 2
lcom 1
cbo 2
dl 0
loc 19
ccs 3
cts 7
cp 0.4286
rs 10
c 1
b 0
f 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A add() 0 11 2
1
<?php
2
3
/*
4
 * This file is part of Symplify
5
 * Copyright (c) 2016 Tomas Votruba (http://tomasvotruba.cz).
6
 */
7
8
namespace Symplify\PHP7_CodeSniffer\Legacy;
9
10
final class LegacyCompatibilityLayer
11
{
12
    /**
13
     * @var bool
14
     */
15
    private static $isAdded = false;
16
17 1
    public static function add()
18
    {
19 1
        if (self::$isAdded) {
20 1
            return;
21
        }
22
23
        LegacyConfiguration::setup();
24
        LegacyClassAliases::register();
25
26
        self::$isAdded = true;
27
    }
28
}
29