Code Duplication    Length = 3-4 lines in 3 locations

locallib.php 3 locations

@@ 176-179 (lines=4) @@
173
        return $meetings;
174
    }
175
176
    if ($xml) {
177
        // Either failure or success without meetings.
178
        return array('returncode' => $xml->returncode, 'message' => $xml->message, 'messageKey' => $xml->messageKey);
179
    }
180
181
    // If the server is unreachable, then prompts the user of the necessary action.
182
    return null;
@@ 211-214 (lines=4) @@
208
                   );
209
    }
210
211
    if ($xml) {
212
        // Either failure or success without meeting info.
213
        return array('returncode' => $xml->returncode, 'message' => $xml->message, 'messageKey' => $xml->messageKey);
214
    }
215
216
    // If the server is unreachable, then prompts the user of the necessary action.
217
    return null;
@@ 506-508 (lines=3) @@
503
        \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('end', ['meetingID' => $meetingid, 'password' => $modpw])
504
      );
505
506
    if ($xml) {
507
        // If the xml packet returned failure it displays the message to the user.
508
        return array('returncode' => $xml->returncode, 'message' => $xml->message, 'messageKey' => $xml->messageKey);
509
    }
510
511
    // If the server is unreachable, then prompts the user of the necessary action.