| Conditions | 3 |
| Paths | 3 |
| Total Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 22 | public static function getType($class) |
||
|
|
|||
| 23 | { |
||
| 24 | if (self::isLegacy()) { |
||
| 25 | return $class; |
||
| 26 | } |
||
| 27 | |||
| 28 | if (!isset(self::$map[$class])) { |
||
| 29 | 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)); |
||
| 30 | } |
||
| 31 | |||
| 32 | return self::$map[$class]; |
||
| 33 | } |
||
| 34 | |||
| 48 |
Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a
@returnannotation as described here.