| Conditions | 1 |
| Paths | 1 |
| Total Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 20 | public static function render(Country $country, $size) |
||
| 21 | { |
||
| 22 | $path = dirname(dirname(__DIR__)).DIRECTORY_SEPARATOR.'public'.DIRECTORY_SEPARATOR.'img'.DIRECTORY_SEPARATOR.'flags'.DIRECTORY_SEPARATOR.$size.DIRECTORY_SEPARATOR; |
||
| 23 | $img = new Image($path.$country->getFlag()); |
||
| 24 | $header = $img->getHeader(); |
||
| 25 | |||
| 26 | ob_start(); |
||
| 27 | $img->output(); |
||
| 28 | $img->destroy(); |
||
| 29 | $i = ob_get_clean(); |
||
| 30 | |||
| 31 | return( '<img src="data:'.$header.';base64,' . base64_encode( $i ).'" />'); |
||
| 32 | } |
||
| 33 | } |