Conditions | 3 |
Paths | 3 |
Total Lines | 12 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
34 | public static function getType($class) |
||
35 | { |
||
36 | if (!self::isLegacy()) { |
||
37 | return $class; |
||
38 | } |
||
39 | |||
40 | if (!isset(self::$map[$class])) { |
||
41 | throw new \InvalidArgumentException(sprintf('Form type with class "%s" can not be found. Please check for typos or add it to the map in LegacyFormHelper', $class)); |
||
42 | } |
||
43 | |||
44 | return self::$map[$class]; |
||
45 | } |
||
46 | |||
65 |