Code Duplication    Length = 5-5 lines in 2 locations

framework/Koch/View/Helper/Smarty/function.icon.php 1 location

@@ 89-93 (lines=5) @@
86
    }
87
88
    // we got no height nor width. well let's detect it automatically then.
89
    if (($height === 0) || ($width === 0)) {
90
        $currentimagesize = getimagesize($src);
91
        $width            = $currentimagesize[0];
92
        $height           = $currentimagesize[1];
93
    }
94
95
    // we got no alternative text. let's add a default text with $name;
96
    if (($src !== null) and empty($alt)) {

framework/Koch/View/Helper/Smarty/function.png_image.php 1 location

@@ 54-58 (lines=5) @@
51
        $width = 0;
52
    }
53
54
    if (($height === 0) || ($width === 0)) {
55
        $currentimagesize = getimagesize($src);
56
        $width            = $currentimagesize[0];
57
        $height           = $currentimagesize[1];
58
    }
59
60
    if (false === (stristr($_SERVER['HTTP_USER_AGENT'], 'MSIE'))) {
61
        $html = "<img src='$src' height='$height' width='$width' alt='$alt' $extra />";