Code Duplication    Length = 3-4 lines in 3 locations

locallib.php 3 locations

@@ 222-225 (lines=4) @@
219
        return $meetings;
220
    }
221
222
    if ($xml) {
223
        // Either failutre or success without meetings.
224
        return array('returncode' => $xml->returncode, 'message' => $xml->message, 'messageKey' => $xml->messageKey);
225
    }
226
227
    // If the server is unreachable, then prompts the user of the necessary action.
228
    return null;
@@ 257-260 (lines=4) @@
254
                   );
255
    }
256
257
    if ($xml) {
258
        // Either failutre or success without meeting info.
259
        return array('returncode' => $xml->returncode, 'message' => $xml->message, 'messageKey' => $xml->messageKey);
260
    }
261
262
    // If the server is unreachable, then prompts the user of the necessary action.
263
    return null;
@@ 464-466 (lines=3) @@
461
        bigbluebuttonbn_bigbluebutton_action_url('end', ['meetingID' => $meetingid, 'password' => $modpw])
462
      );
463
464
    if ($xml) {
465
        // If the xml packet returned failure it displays the message to the user.
466
        return array('returncode' => $xml->returncode, 'message' => $xml->message, 'messageKey' => $xml->messageKey);
467
    }
468
469
    // If the server is unreachable, then prompts the user of the necessary action.