Code Duplication    Length = 8-8 lines in 3 locations

main/auth/cas/lib/CAS/client.php 3 locations

@@ 1419-1426 (lines=8) @@
1416
                break;
1417
            case CAS_VERSION_2_0:
1418
                // read the response of the CAS server into a DOM object
1419
                if (!($dom = domxml_open_mem($text_response))) {
1420
                    phpCAS::trace('domxml_open_mem() failed');
1421
                    $this->authError('ST not validated',
1422
                        $validate_url,
1423
                        false/*$no_response*/,
1424
                        true/*$bad_response*/,
1425
                        $text_response);
1426
                }
1427
                // read the root node of the XML tree
1428
                if (!($tree_response = $dom->document_element())) {
1429
                    phpCAS::trace('document_element() failed');
@@ 1528-1535 (lines=8) @@
1525
            case SAML_VERSION_1_1:
1526
1527
                // read the response of the CAS server into a DOM object
1528
                if (!($dom = domxml_open_mem($text_response))) {
1529
                    phpCAS::trace('domxml_open_mem() failed');
1530
                    $this->authError('SA not validated',
1531
                        $validate_url,
1532
                        false/*$no_response*/,
1533
                        true/*$bad_response*/,
1534
                        $text_response);
1535
                }
1536
                // read the root node of the XML tree
1537
                if (!($tree_response = $dom->document_element())) {
1538
                    phpCAS::trace('document_element() failed');
@@ 2534-2541 (lines=8) @@
2531
        }
2532
2533
        // read the response of the CAS server into a DOM object
2534
        if (!($dom = domxml_open_mem($text_response))) {
2535
            // read failed
2536
            $this->authError('PT not validated',
2537
                $validate_url,
2538
                false/*$no_response*/,
2539
                true/*$bad_response*/,
2540
                $text_response);
2541
        }
2542
        // read the root node of the XML tree
2543
        if (!($tree_response = $dom->document_element())) {
2544
            // read failed