Code Duplication    Length = 11-11 lines in 3 locations

core/EE_Error.core.php 3 locations

@@ 973-983 (lines=11) @@
970
        $close   = is_admin()
971
            ? ''
972
            : '<a class="close-espresso-notice hide-if-no-js"><span class="dashicons dashicons-no"/></a>';
973
        if ($success_messages !== '') {
974
            $css_id    = is_admin() ? 'ee-success-message' : 'espresso-notices-success';
975
            $css_class = is_admin() ? 'updated fade' : 'success fade-away';
976
            //showMessage( $success_messages );
977
            $notices .= '<div id="' . $css_id . '" '
978
                        . 'class="espresso-notices ' . $css_class . '" '
979
                        . 'style="display:none;">'
980
                        . '<p>' . $success_messages . '</p>'
981
                        . $close
982
                        . '</div>';
983
        }
984
        if ($attention_messages !== '') {
985
            $css_id    = is_admin() ? 'ee-attention-message' : 'espresso-notices-attention';
986
            $css_class = is_admin() ? 'updated ee-notices-attention' : 'attention fade-away';
@@ 984-994 (lines=11) @@
981
                        . $close
982
                        . '</div>';
983
        }
984
        if ($attention_messages !== '') {
985
            $css_id    = is_admin() ? 'ee-attention-message' : 'espresso-notices-attention';
986
            $css_class = is_admin() ? 'updated ee-notices-attention' : 'attention fade-away';
987
            //showMessage( $error_messages, TRUE );
988
            $notices .= '<div id="' . $css_id . '" '
989
                        . 'class="espresso-notices ' . $css_class . '" '
990
                        . 'style="display:none;">'
991
                        . '<p>' . $attention_messages . '</p>'
992
                        . $close
993
                        . '</div>';
994
        }
995
        if ($error_messages !== '') {
996
            $css_id    = is_admin() ? 'ee-error-message' : 'espresso-notices-error';
997
            $css_class = is_admin() ? 'error' : 'error fade-away';
@@ 995-1005 (lines=11) @@
992
                        . $close
993
                        . '</div>';
994
        }
995
        if ($error_messages !== '') {
996
            $css_id    = is_admin() ? 'ee-error-message' : 'espresso-notices-error';
997
            $css_class = is_admin() ? 'error' : 'error fade-away';
998
            //showMessage( $error_messages, TRUE );
999
            $notices .= '<div id="' . $css_id . '" '
1000
                        . 'class="espresso-notices ' . $css_class . '" '
1001
                        . 'style="display:none;">'
1002
                        . '<p>' . $error_messages . '</p>'
1003
                        . $close
1004
                        . '</div>';
1005
        }
1006
        $notices .= '</div>';
1007
        return $notices;
1008
    }