Code Duplication    Length = 18-18 lines in 3 locations

Apps/View/Admin/default/native/macro/notify.php 1 location

@@ 11-28 (lines=18) @@
8
 * @param string $type
9
 * @return string
10
 */
11
function type2html($type)
12
{
13
    switch ($type) {
14
        case 'error':
15
            $htmlType = 'alert-danger';
16
            break;
17
        case 'success':
18
            $htmlType = 'alert-success';
19
            break;
20
        case 'warning':
21
            $htmlType = 'alert-warning';
22
            break;
23
        default:
24
            $htmlType = 'alert-info';
25
            break;
26
    }
27
    return $htmlType;
28
}
29
30
if (Obj::isArray($notify) && count($notify) > 0) {
31
    foreach ($notify as $type => $messages) {

Apps/View/Front/default/native/macro/notify.php 1 location

@@ 11-28 (lines=18) @@
8
 * @param string $type
9
 * @return string
10
 */
11
function type2html($type)
12
{
13
    switch ($type) {
14
        case 'error':
15
            $htmlType = 'alert-danger';
16
            break;
17
        case 'success':
18
            $htmlType = 'alert-success';
19
            break;
20
        case 'warning':
21
            $htmlType = 'alert-warning';
22
            break;
23
        default:
24
            $htmlType = 'alert-info';
25
            break;
26
    }
27
    return $htmlType;
28
}
29
30
if (Obj::isArray($notify) && count($notify) > 0) {
31
    foreach ($notify as $type => $messages) {

Apps/View/Install/default/native/macro/notify.php 1 location

@@ 11-28 (lines=18) @@
8
 * @param string $type
9
 * @return string
10
 */
11
function type2html($type)
12
{
13
    switch ($type) {
14
        case 'error':
15
            $htmlType = 'alert-danger';
16
            break;
17
        case 'success':
18
            $htmlType = 'alert-success';
19
            break;
20
        case 'warning':
21
            $htmlType = 'alert-warning';
22
            break;
23
        default:
24
            $htmlType = 'alert-info';
25
            break;
26
    }
27
    return $htmlType;
28
}
29
30
if (Obj::isArray($notify) && count($notify) > 0) {
31
    foreach ($notify as $type => $messages) {