Completed
Push — master ( b7e642...0ba8e7 )
by Paweł
04:39 queued 02:16
created

LegacyFormHelper   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getType() 0 6 2
A isLegacy() 0 4 1
A __construct() 0 3 1
A __clone() 0 3 1
1
<?php
2
3
namespace Clearcode\CommandBusConsole\Bundle;
4
5
final class LegacyFormHelper
6
{
7
    public static function getType($class, $alias)
8
    {
9
        return self::isLegacy() ?
10
            $alias :
11
            $class;
12
    }
13
14
    public static function isLegacy()
15
    {
16
        return !method_exists('Symfony\Component\Form\AbstractType', 'getBlockPrefix');
17
    }
18
19
    private function __construct()
20
    {
21
    }
22
23
    private function __clone()
24
    {
25
    }
26
}
27