original_string: public function addValidationMessageToSession(array $result, Mage_Core_Model_Session_Abstract $session)
      {
          if (isset($result[Fontis_Australia_Helper_Address::ADDRESS_OVERRIDE_FLAG])) {
              $session->addSuccess(' Address successfully overridden without validation.');
          } else if (!$result || !isset($result['ValidAustralianAddress'])) {
              $session->addWarning('Unable to validate address.');
          } else if (isset($result['validAddress']) && $result['validAddress']) {
              $session->addSuccess(' Address successfully validated.');
          } else if (isset($result['suggestion'])) {
              $session->addWarning("Address is not valid; did you mean: {$result['suggestion']}");
          } else {
              $session->addWarning('Address is not valid; no suggestions available.');
          }
      }
code: public function addValidationMessageToSession(array $result, Mage_Core_Model_Session_Abstract $session)
      {
          if (isset($result[Fontis_Australia_Helper_Address::ADDRESS_OVERRIDE_FLAG])) {
              $session->addSuccess(' Address successfully overridden without validation.');
          } else if (!$result || !isset($result['ValidAustralianAddress'])) {
              $session->addWarning('Unable to validate address.');
          } else if (isset($result['validAddress']) && $result['validAddress']) {
              $session->addSuccess(' Address successfully validated.');
          } else if (isset($result['suggestion'])) {
              $session->addWarning("Address is not valid; did you mean: {$result['suggestion']}");
          } else {
              $session->addWarning('Address is not valid; no suggestions available.');
          }
      }
code_tokens: public function addValidationMessageToSession ( array $ result , Mage_Core_Model_Session_Abstract $ session ) { if ( isset ( $ result [ Fontis_Australia_Helper_Address :: ADDRESS_OVERRIDE_FLAG ] ) ) { $ session -> addSuccess ( ' Address successfully overridden without validation.' ) ; } else if ( ! $ result || ! isset ( $ result [ 'ValidAustralianAddress' ] ) ) { $ session -> addWarning ( 'Unable to validate address.' ) ; } else if ( isset ( $ result [ 'validAddress' ] ) && $ result [ 'validAddress' ] ) { $ session -> addSuccess ( ' Address successfully validated.' ) ; } else if ( isset ( $ result [ 'suggestion' ] ) ) { $ session -> addWarning ( "Address is not valid; did you mean: {$result['suggestion']}" ) ; } else { $ session -> addWarning ( 'Address is not valid; no suggestions available.' ) ; } }
docstring: Adds a status message to the session, based on a validation result.
  
  Success messages should have a leading space, since the new message is appended to the 'The order address
  has been updated.' message.
  
  @param array $result Address validation result array.
  @param Mage_Core_Model_Session_Abstract $session Session object
docstring_tokens: Adds a status message to the session based on a validation result .