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

LegacyFormHelper::__clone()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

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