From 8fe8c14bcce1af9c5a1cd6509ac0b4e20f695ebd Mon Sep 17 00:00:00 2001 From: Demian Katz <demian.katz@villanova.edu> Date: Thu, 4 Dec 2014 11:34:30 -0500 Subject: [PATCH] Style fixes. --- .../src/VuFind/ILS/Driver/VoyagerRestful.php | 22 ++++++++----------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/module/VuFind/src/VuFind/ILS/Driver/VoyagerRestful.php b/module/VuFind/src/VuFind/ILS/Driver/VoyagerRestful.php index eea2fd753cb..924aac604fe 100644 --- a/module/VuFind/src/VuFind/ILS/Driver/VoyagerRestful.php +++ b/module/VuFind/src/VuFind/ILS/Driver/VoyagerRestful.php @@ -3193,29 +3193,25 @@ EOT; $error = $result->xpath("//ser:message[@type='error']"); if (!empty($error)) { $error = reset($error); - if ($error->attributes()->errorCode - == 'com.endinfosys.voyager.patronpin.PatronPIN.ValidateException' - ) { + $code = $error->attributes()->errorCode; + $exceptionNamespace = 'com.endinfosys.voyager.patronpin.PatronPIN.'; + if ($code == $exceptionNamespace . 'ValidateException') { return array( 'success' => false, 'status' => 'authentication_error_invalid' ); } - if ($error->attributes()->errorCode - == - 'com.endinfosys.voyager.patronpin.PatronPIN.ValidateUniqueException' - ) { + if ($code == $exceptionNamespace . 'ValidateUniqueException') { return array( 'success' => false, 'status' => 'password_error_not_unique' ); } - if ($error->attributes()->errorCode - == - 'com.endinfosys.voyager.patronpin.PatronPIN.ValidateLengthException' - ) { + if ($code == $exceptionNamespace . 'ValidateLengthException') { // This issue should not be encountered if the settings are correct. // Log an error and let through for an exception - $this->error('ValidateLengthException encountered when trying to' - . ' change patron PIN. Verify PIN length settings.'); + $this->error( + 'ValidateLengthException encountered when trying to' + . ' change patron PIN. Verify PIN length settings.' + ); } throw new ILSException((string)$error); } -- GitLab