From c38bc715c1fa4bcf6c8ec585e03a040a7b5c7d4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viktor=20Sz=C3=A9pe?= Date: Wed, 9 Aug 2023 22:23:09 +0000 Subject: [PATCH] Fix critical errors --- sdk/Eversign/ApiRequest.php | 9 ++++---- sdk/Eversign/Business.php | 2 +- sdk/Eversign/Client.php | 34 +++++++++++++++---------------- sdk/Eversign/Document.php | 10 ++++----- sdk/Eversign/DocumentTemplate.php | 6 +++--- sdk/Eversign/InitialsField.php | 1 - 6 files changed, 30 insertions(+), 32 deletions(-) diff --git a/sdk/Eversign/ApiRequest.php b/sdk/Eversign/ApiRequest.php index 9872d90..9e36872 100644 --- a/sdk/Eversign/ApiRequest.php +++ b/sdk/Eversign/ApiRequest.php @@ -57,8 +57,8 @@ class ApiRequest { * @param string $accessKey * @param string $endPoint * @param string $serializeClass - * @param [] $parameters - * @param [] $payLoad + * @param array $parameters + * @param array $payLoad */ public function __construct( @@ -94,7 +94,6 @@ public function __construct( $this->serializeClass = $serializeClass; $this->parameters = $parameters; $this->payLoad = $payLoad; - $this->apiB = $apiBaseUrl; $this->guzzleRequestTimeout = $apiRequestTimeout; } @@ -150,7 +149,7 @@ private function createQuery() { /** * Starts a MultiPart Upload Request to the API - * @return [] + * @return object * @throws \Exception */ public function startMultipartUpload() { @@ -187,7 +186,7 @@ public function startMultipartUpload() { * Starts the configured API Request of the ApiRequest instance. * Returns different objects based on the request sent. Consult the Eversign API * documentation for more information. - * @return stdClass + * @return \stdClass * @throws \Exception */ public function startRequest() { diff --git a/sdk/Eversign/Business.php b/sdk/Eversign/Business.php index 410b0f4..8cd3ca8 100644 --- a/sdk/Eversign/Business.php +++ b/sdk/Eversign/Business.php @@ -148,7 +148,7 @@ public function setIsPrimary($isPrimary) { /** * Returns the Creation Date of the Business - * @return DateTime + * @return \DateTime */ public function getCreationTimeStamp() { return $this->creationTimeStamp; diff --git a/sdk/Eversign/Client.php b/sdk/Eversign/Client.php index 15d9f6b..d9a2f63 100644 --- a/sdk/Eversign/Client.php +++ b/sdk/Eversign/Client.php @@ -45,7 +45,7 @@ class Client { /** * Reference to the Access Key * - * @var Access Key $accessKey + * @var string $accessKey */ protected $accessKey; @@ -59,7 +59,7 @@ class Client { /** * The selected Business which will be used for subsequent API requests - * @var \Business $selectedBusiness + * @var \Eversign\Business $selectedBusiness */ private $selectedBusiness; @@ -121,7 +121,7 @@ public function getBusinesses() { /** * Requests a OAuth Access Token * - * @return $oauthAccessToken + * @return string */ public function generateOAuthAuthorizationUrl($obj) { if(!array_key_exists('client_id', $obj)) { @@ -138,7 +138,7 @@ public function generateOAuthAuthorizationUrl($obj) { /** * Requests a OAuth Access Token * - * @return $oauthAccessToken + * @return string */ public function requestOAuthToken(OAuthTokenRequest $token_request) { $request = new ApiRequest( @@ -158,7 +158,7 @@ public function requestOAuthToken(OAuthTokenRequest $token_request) { /** * Sets a OAuth Access Token to beeing used as the access_key * - * @return $oauthAccessToken + * @return void */ public function setOAuthAccessToken($oauthToken) { $this->accessKey = 'Bearer ' . $oauthToken; @@ -168,7 +168,7 @@ public function setOAuthAccessToken($oauthToken) { /** * Retrieves all available Business for the current Client * - * @return \Business[] + * @return void */ public function fetchBusinesses($setDefault = true) { if($this->accessKey) { @@ -260,7 +260,7 @@ private function getDocuments($type = "all") { /** * Returns all Documents for the Client without filtering the state * Only exception are deleted Documents - * @return \Document[] + * @return \Eversign\Document[] */ public function getAllDocuments() { return $this->getDocuments(); @@ -268,7 +268,7 @@ public function getAllDocuments() { /** * Returns all Completed Documents for the Client - * @return \Document[] + * @return \Eversign\Document[] */ public function getCompletedDocuments() { return $this->getDocuments("completed"); @@ -276,7 +276,7 @@ public function getCompletedDocuments() { /** * Returns all Documents which are still in Draft - * @return \Document[] + * @return \Eversign\Document[] */ public function getDraftDocuments() { return $this->getDocuments("drafts"); @@ -284,7 +284,7 @@ public function getDraftDocuments() { /** * Returns all canceled Documents for the Client - * @return \Document[] + * @return \Eversign\Document[] */ public function getCanceledDocuments() { return $this->getDocuments("cancelled"); @@ -293,7 +293,7 @@ public function getCanceledDocuments() { /** * Returns all Documents for the Client which require Actions * from the User - * @return \Document[] + * @return \Eversign\Document[] */ public function getActionRequiredDocuments() { return $this->getDocuments("my_action_required"); @@ -302,7 +302,7 @@ public function getActionRequiredDocuments() { /** * Returns all Documents for the Client which are waiting on responses * from others. - * @return \Document[] + * @return \Eversign\Document[] */ public function getWaitingForOthersDocuments() { return $this->getDocuments("waiting_for_others"); @@ -310,7 +310,7 @@ public function getWaitingForOthersDocuments() { /** * Returns a list of Documents which are set to be Templates - * @return \Document[] + * @return \Eversign\Document[] */ public function getTemplates() { return $this->getDocuments("templates"); @@ -319,7 +319,7 @@ public function getTemplates() { /** * Returns a list of Documents which are set to be Templates * which are also set to be archived - * @return \Document[] + * @return \Eversign\Document[] */ public function getArchivedTemplates() { return $this->getDocuments("templates_archived"); @@ -328,7 +328,7 @@ public function getArchivedTemplates() { /** * Returns a list of Documents which are set to be Templates * which are also set to be drafts - * @return \Document[] + * @return \Eversign\Document[] */ public function getDraftTemplates() { return $this->getDocuments("template_drafts"); @@ -340,7 +340,7 @@ public function getDraftTemplates() { * Returns true or false whether the reminder has been sent * @param \Eversign\Document $document * @param \Eversign\Signer $signer - * @throws Exception + * @throws \Exception * @return boolean success */ public function sendReminderForDocument(Document $document, Signer $signer) { @@ -642,7 +642,7 @@ public function deleteDocument(Document $document, $type=NULL) { /** * Cancels the specified Document. After canceling the Document * it can be deleted. - * @param type $document + * @param \Eversign\Document $document * @return boolean success */ public function cancelDocument($document) { diff --git a/sdk/Eversign/Document.php b/sdk/Eversign/Document.php index e598504..1f1fc2d 100644 --- a/sdk/Eversign/Document.php +++ b/sdk/Eversign/Document.php @@ -224,7 +224,7 @@ class Document { /** * Array of Signer Objects which are associated with the Document * - * @var array $signers + * @var array<\Eversign\Signer> $signers * @Type("array") */ private $signers; @@ -232,7 +232,7 @@ class Document { /** * Array of Recipient Objects which are associated with the Document * - * @var array $signers + * @var array<\Eversign\Recipient> $signers * @Type("array") */ private $recipients; @@ -240,7 +240,7 @@ class Document { /** * Array of LogEntry Objects which are associated with the Document * - * @var array $log + * @var array<\Eversign\LogEntry> $log * @Type("array") */ private $log; @@ -248,7 +248,7 @@ class Document { /** * Array of FormField Objects and there respective Subclass * - * @var array> $fields + * @var array> $fields * @Type("array>") */ private $fields; @@ -256,7 +256,7 @@ class Document { /** * Array of File Objects which are associated with the Document * - * @var array $files + * @var array<\Eversign\File> $files * @Type("array") */ private $files; diff --git a/sdk/Eversign/DocumentTemplate.php b/sdk/Eversign/DocumentTemplate.php index 61a0694..7a33887 100644 --- a/sdk/Eversign/DocumentTemplate.php +++ b/sdk/Eversign/DocumentTemplate.php @@ -103,7 +103,7 @@ class DocumentTemplate { /** * Array of Signer Objects which are associated with the Document * - * @var array $signers + * @var array<\Eversign\Signer> $signers * @Type("array") */ private $signers; @@ -111,7 +111,7 @@ class DocumentTemplate { /** * Array of Recipient Objects which are associated with the Document * - * @var array $signers + * @var array<\Eversign\Recipient> $signers * @Type("array") */ private $recipients; @@ -119,7 +119,7 @@ class DocumentTemplate { /** * This object must contain a sub array for each Merge Field of this template. * - * @var array $fields + * @var array<\Eversign\Field> $fields * @Type("array") */ private $fields; diff --git a/sdk/Eversign/InitialsField.php b/sdk/Eversign/InitialsField.php index f0d3f0f..49b6d1e 100644 --- a/sdk/Eversign/InitialsField.php +++ b/sdk/Eversign/InitialsField.php @@ -44,7 +44,6 @@ class InitialsField extends FormField{ public function __construct() { parent::__construct(); - $this->type = "initials"; $this->setWidth(43); $this->setHeight(43); $this->setRequired(false);