Skip to content

Commit

Permalink
chore: revert changes to client
Browse files Browse the repository at this point in the history
  • Loading branch information
brianreichtcs committed Nov 16, 2023
1 parent e855e9f commit a03cfd7
Showing 1 changed file with 11 additions and 33 deletions.
44 changes: 11 additions & 33 deletions src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -256,9 +256,7 @@ public function createUser(User $user): User {
if ((string) $bodyAsXml->Result === 'Failed') {
throw new SmarterUException(
self::SMARTERU_EXCEPTION_MESSAGE,
$this->getErrorCodesFromXmlElement($bodyAsXml->Errors),
$xml,
(string) $response->getBody()
$this->getErrorCodesFromXmlElement($bodyAsXml->Errors)
);
}

Expand Down Expand Up @@ -359,9 +357,7 @@ public function listUsers(ListUsersQuery $query): array {
if ((string) $bodyAsXml->Result === 'Failed') {
throw new SmarterUException(
self::SMARTERU_EXCEPTION_MESSAGE,
$this->getErrorCodesFromXmlElement($bodyAsXml->Errors),
$xml,
(string) $response->getBody()
$this->getErrorCodesFromXmlElement($bodyAsXml->Errors)
);
}

Expand Down Expand Up @@ -450,9 +446,7 @@ public function updateUser(User $user): User {
$errors = $this->getErrorCodesFromXmlElement($bodyAsXml->Errors);
throw new SmarterUException(
self::SMARTERU_EXCEPTION_MESSAGE,
$errors,
$xml,
(string) $response->getBody()
$errors
);
}

Expand Down Expand Up @@ -554,9 +548,7 @@ public function createGroup(Group $group): Group {
if ((string) $bodyAsXml->Result === 'Failed') {
throw new SmarterUException(
self::SMARTERU_EXCEPTION_MESSAGE,
$this->getErrorCodesFromXmlElement($bodyAsXml->Errors),
$xml,
(string) $response->getBody()
$this->getErrorCodesFromXmlElement($bodyAsXml->Errors)
);
}

Expand Down Expand Up @@ -641,9 +633,7 @@ public function listGroups(ListGroupsQuery $query): array
$errors = $this->getErrorCodesFromXmlElement($bodyAsXml->Errors);
throw new SmarterUException(
self::SMARTERU_EXCEPTION_MESSAGE,
$errors,
$xml,
(string) $response->getBody()
$errors
);
}

Expand Down Expand Up @@ -708,9 +698,7 @@ public function updateGroup(Group $group): Group {
if ((string) $bodyAsXml->Result === 'Failed') {
throw new SmarterUException(
self::SMARTERU_EXCEPTION_MESSAGE,
$this->getErrorCodesFromXmlElement($bodyAsXml->Errors),
$xml,
(string) $response->getBody()
$this->getErrorCodesFromXmlElement($bodyAsXml->Errors)
);
}

Expand Down Expand Up @@ -818,9 +806,7 @@ public function removeUsersFromGroup(array $users, Group $group): Group {
if ((string) $bodyAsXml->Result === 'Failed') {
throw new SmarterUException(
self::SMARTERU_EXCEPTION_MESSAGE,
$this->getErrorCodesFromXmlElement($bodyAsXml->Errors),
$xml,
(string) $response->getBody()
$this->getErrorCodesFromXmlElement($bodyAsXml->Errors)
);
}

Expand Down Expand Up @@ -1013,9 +999,7 @@ public function getLearnerReport(GetLearnerReportQuery $query): array {
if ((string) $bodyAsXml->Result === 'Failed') {
throw new SmarterUException(
self::SMARTERU_EXCEPTION_MESSAGE,
$this->getErrorCodesFromXmlElement($bodyAsXml->Errors),
$xml,
(string) $response->getBody()
$this->getErrorCodesFromXmlElement($bodyAsXml->Errors)
);
}

Expand Down Expand Up @@ -1218,9 +1202,7 @@ protected function getUser(GetUserQuery $query): ?User {

throw new SmarterUException(
self::SMARTERU_EXCEPTION_MESSAGE,
$this->getErrorCodesFromXmlElement($bodyAsXml->Errors),
$xml,
(string) $response->getBody()
$this->getErrorCodesFromXmlElement($bodyAsXml->Errors)
);
}

Expand Down Expand Up @@ -1325,9 +1307,7 @@ protected function getUserGroups(GetUserQuery $query): array {
if ((string) $bodyAsXml->Result === 'Failed') {
throw new SmarterUException(
self::SMARTERU_EXCEPTION_MESSAGE,
$this->getErrorCodesFromXmlElement($bodyAsXml->Errors),
$xml,
(string) $response->getBody()
$this->getErrorCodesFromXmlElement($bodyAsXml->Errors)
);
}

Expand Down Expand Up @@ -1471,9 +1451,7 @@ protected function requestExternalAuthorization(
if ((string) $bodyAsXml->Result === 'Failed') {
throw new SmarterUException(
self::SMARTERU_EXCEPTION_MESSAGE,
$this->getErrorCodesFromXmlElement($bodyAsXml->Errors),
$xml,
(string) $response->getBody()
$this->getErrorCodesFromXmlElement($bodyAsXml->Errors)
);
}

Expand Down

0 comments on commit a03cfd7

Please sign in to comment.