/**
  * Get the resulting notice ID from the reponse header of the API
  * request.
  *
  * @param  MWHttpRequest $response The response from the API request.
  * @return int|boolean             The ID of the resulting notice or
  *                                 false on failure.
  */
 public function getNoticeIdFromResponse(\MWHttpRequest $response)
 {
     $location = $response->getResponseHeader('Location');
     if (empty($location)) {
         return false;
     }
     $path = parse_url($location, PHP_URL_PATH);
     $matches = [];
     if (preg_match('/^\\/notices\\/(\\d+)$/', $path, $matches)) {
         return (int) $matches[1];
     }
     return false;
 }