<commit_before><?php

/**
 * Example:
 * <code>
 * $post_xml = file_get_contents ("php://input");
 * $notification = new Recurly_PushNotification($post_xml);
 * </code>
 */
class Recurly_PushNotification
{
  /* Notification type:
   *   [new_account_notification
   *    updated_account_notification
   *    canceled_account_notification
   *    new_subscription_notification
   *    updated_subscription_notification
   *    canceled_subscription_notification
   *    expired_subscription_notification
   *    successful_payment_notification
   *    failed_payment_notification
   *    successful_refund_notification
   *    void_payment_notification
   *   ]
   */
  var $type;

  var $account;
  var $subscription;
  var $transaction;

  function __construct($post_xml)
  {
    $this->parseXml($post_xml);
  }
  
  function parseXml($post_xml)
  {
    if (!@simplexml_load_string ($post_xml)) {
      return;
    }
    $xml = new SimpleXMLElement ($post_xml);
    <commit_msg>remove brackets in comment since this isn't a proper array anyway<commit_after><?php

/**
 * Example:
 * <code>
 * $post_xml = file_get_contents ("php://input");
 * $notification = new Recurly_PushNotification($post_xml);
 * </code>
 */
class Recurly_PushNotification
{
  /* Notification type:
   *    new_account_notification
   *    updated_account_notification
   *    canceled_account_notification
   *    new_subscription_notification
   *    updated_subscription_notification
   *    canceled_subscription_notification
   *    expired_subscription_notification
   *    successful_payment_notification
   *    failed_payment_notification
   *    successful_refund_notification
   *    void_payment_notification
   */
  var $type;

  var $account;
  var $subscription;
  var $transaction;

  function __construct($post_xml)
  {
    $this->parseXml($post_xml);
  }
  
  function parseXml($post_xml)
  {
    if (!@simplexml_load_string ($post_xml)) {
      return;
    }
    $xml = new SimpleXMLElement ($post_xml);
    
{'fraction_non_alphanumeric': 0.095952023988006, 'fraction_numerical': 0.0, 'mean_word_length': 3.5812356979405036, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 18}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6254287', 'n_tokens_mistral': 611, 'n_tokens_neox': 621, 'n_words': 102}