Code Duplication    Length = 3-4 lines in 3 locations

locallib.php 3 locations

@@ 190-193 (lines=4) @@
187
        return $meetings;
188
    }
189
190
    if ($xml) {
191
        // Either failure or success without meetings.
192
        return array('returncode' => $xml->returncode, 'message' => $xml->message, 'messageKey' => $xml->messageKey);
193
    }
194
195
    // If the server is unreachable, then prompts the user of the necessary action.
196
    return null;
@@ 225-228 (lines=4) @@
222
                   );
223
    }
224
225
    if ($xml) {
226
        // Either failure or success without meeting info.
227
        return array('returncode' => $xml->returncode, 'message' => $xml->message, 'messageKey' => $xml->messageKey);
228
    }
229
230
    // If the server is unreachable, then prompts the user of the necessary action.
231
    return null;
@@ 520-522 (lines=3) @@
517
        bigbluebuttonbn_bigbluebutton_action_url('end', ['meetingID' => $meetingid, 'password' => $modpw])
518
      );
519
520
    if ($xml) {
521
        // If the xml packet returned failure it displays the message to the user.
522
        return array('returncode' => $xml->returncode, 'message' => $xml->message, 'messageKey' => $xml->messageKey);
523
    }
524
525
    // If the server is unreachable, then prompts the user of the necessary action.