| Total Complexity | 5 |
| Total Lines | 20 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 0 | ||
| 1 | <?php |
||
| 5 | class ConstraintViolationViewer { |
||
| 6 | const SEVERITY_ICONS=[ |
||
| 7 | 'default'=>['icon'=>'thumbtack','type'=>''], |
||
| 8 | 'info'=>['icon'=>'info circle','type'=>'info'], |
||
| 9 | 'warning'=>['icon'=>'exclamation circle','type'=>'warning'], |
||
| 10 | 'error'=>['icon'=>'exclamation triangle','type'=>'error'] |
||
| 11 | ]; |
||
| 12 | |||
| 13 | private static function getValue($severity){ |
||
| 14 | if(isset($severity) && isset(self::SEVERITY_ICONS[$severity])){ |
||
| 15 | return self::SEVERITY_ICONS[$severity]; |
||
| 16 | } |
||
| 17 | return self::SEVERITY_ICONS['default']; |
||
| 18 | } |
||
| 19 | public static function getIcon($severity){ |
||
| 20 | return self::getValue($severity)['icon']; |
||
| 21 | } |
||
| 22 | |||
| 23 | public static function getType($severity){ |
||
| 25 | } |
||
| 26 | } |
||
| 27 | |||
| 28 |