Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,18 @@
"php": "^7.4 || ^8.0",
"sabre/xml": "^4.0",
"nesbot/carbon": "^2.72 || ^3.11",
"doctrine/collections": "^1.8 || ^2.0"
"doctrine/collections": "^1.8 || ^2.0",
"ext-fileinfo": "*",
"ext-libxml": "*"
},
"require-dev": {
"squizlabs/php_codesniffer": "^3.7",
"phpstan/phpstan": "^1.10",
"brianium/paratest": "^6.11",
"phpunit/phpunit": "^9.6"
"phpunit/phpunit": "^9.6",
"ext-dom": "*",
"ext-json": "*",
"ext-soap": "*"
},
"autoload": {
"psr-4": {
Expand Down
23 changes: 11 additions & 12 deletions src/AccountingParty.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,20 @@

class AccountingParty implements XmlSerializable, XmlDeserializable
{
private $supplierAssignedAccountID;
private $party;
private $accountingContact;
private ?string $supplierAssignedAccountID = null;
private ?Party $party = null;
private ?Contact $accountingContact = null;

/**
* @return string
* @return string|null
*/
public function getSupplierAssignedAccountId(): ?string
{
return $this->supplierAssignedAccountID;
}

/**
* @param string $supplierAssignedAccountID
* @param string|null $supplierAssignedAccountID
* @return static
*/
public function setSupplierAssignedAccountId(?string $supplierAssignedAccountID)
Expand All @@ -34,15 +34,15 @@ public function setSupplierAssignedAccountId(?string $supplierAssignedAccountID)
}

/**
* @return Party
* @return Party|null
*/
public function getParty(): ?Party
{
return $this->party;
}

/**
* @param Party $party
* @param Party|null $party
* @return static
*/
public function setParty(?Party $party)
Expand All @@ -52,15 +52,15 @@ public function setParty(?Party $party)
}

/**
* @return ?Contact
* @return Contact|null
*/
public function getAccountingContact(): ?Contact
{
return $this->accountingContact;
}

/**
* @param Contact $accountingContact
* @param Contact|null $accountingContact
* @return AccountingParty
*/
public function setAccountingContact(?Contact $accountingContact): AccountingParty
Expand Down Expand Up @@ -99,7 +99,7 @@ public function xmlSerialize(Writer $writer): void

/**
* The xmlDeserialize method is called during xml reading.
* @param Reader $xml
* @param Reader $reader
* @return static
*/
public static function xmlDeserialize(Reader $reader)
Expand All @@ -109,7 +109,6 @@ public static function xmlDeserialize(Reader $reader)
return (new static())
->setParty($keyValues[Schema::CAC . 'Party'] ?? null)
->setSupplierAssignedAccountId($keyValues[Schema::CBC . 'SupplierAssignedAccountID'] ?? null)
->setAccountingContact($keyValues[Schema::CBC . 'AccountingContact'] ?? null)
;
->setAccountingContact($keyValues[Schema::CBC . 'AccountingContact'] ?? null);
}
}
33 changes: 16 additions & 17 deletions src/AdditionalDocumentReference.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,22 @@

class AdditionalDocumentReference implements XmlSerializable, XmlDeserializable
{
private $id;
private $documentType;
private $documentTypeCode;
private $documentDescription;
private $attachment;
private ?string $id = null;
private ?string $documentType = null;
private $documentTypeCode = null;
private ?string $documentDescription = null;
private ?Attachment $attachment = null;

/**
* @return string
* @return string|null
*/
public function getId(): ?string
{
return $this->id;
}

/**
* @param string $id
* @param string|null $id
* @return static
*/
public function setId(?string $id)
Expand All @@ -36,15 +36,15 @@ public function setId(?string $id)
}

/**
* @return string
* @return string|null
*/
public function getDocumentType(): ?string
{
return $this->documentType;
}

/**
* @param string $documentType
* @param string|null $documentType
* @return static
*/
public function setDocumentType(?string $documentType)
Expand All @@ -62,7 +62,7 @@ public function getDocumentTypeCode()
}

/**
* @param int|string $documentTypeCode
* @param int|string|null $documentTypeCode
* @return static
*/
public function setDocumentTypeCode($documentTypeCode)
Expand All @@ -72,15 +72,15 @@ public function setDocumentTypeCode($documentTypeCode)
}

/**
* @return string
* @return string|null
*/
public function getDocumentDescription(): ?string
{
return $this->documentDescription;
}

/**
* @param string $documentDescription
* @param string|null $documentDescription
* @return static
*/
public function setDocumentDescription(?string $documentDescription)
Expand All @@ -90,15 +90,15 @@ public function setDocumentDescription(?string $documentDescription)
}

/**
* @return Attachment
* @return Attachment|null
*/
public function getAttachment(): ?Attachment
{
return $this->attachment;
}

/**
* @param Attachment $attachment
* @param Attachment|null $attachment
* @return static
*/
public function setAttachment(?Attachment $attachment)
Expand Down Expand Up @@ -144,7 +144,7 @@ public function xmlSerialize(Writer $writer): void

/**
* The xmlDeserialize method is called during xml reading.
* @param Reader $xml
* @param Reader $reader
* @return static
*/
public static function xmlDeserialize(Reader $reader)
Expand All @@ -156,7 +156,6 @@ public static function xmlDeserialize(Reader $reader)
->setDocumentType($keyValues[Schema::CBC . 'DocumentType'] ?? null)
->setDocumentTypeCode($keyValues[Schema::CBC . 'DocumentTypeCode'] ?? null)
->setDocumentDescription($keyValues[Schema::CBC . 'DocumentDescription'] ?? null)
->setAttachment($keyValues[Schema::CAC . 'Attachment'] ?? null)
;
->setAttachment($keyValues[Schema::CAC . 'Attachment'] ?? null);
}
}
12 changes: 6 additions & 6 deletions src/AdditionalItemProperty.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,19 @@
*/
class AdditionalItemProperty implements XmlSerializable, XmlDeserializable
{
private $name;
private $value;
private ?string $name = null;
private ?string $value = null;

/**
* @return string
* @return string|null
*/
public function getName(): ?string
{
return $this->name;
}

/**
* @param string $name
* @param string|null $name
* @return static
*/
public function setName(?string $name)
Expand All @@ -39,15 +39,15 @@ public function setName(?string $name)
}

/**
* @return string
* @return string|null
*/
public function getValue(): ?string
{
return $this->value;
}

/**
* @param string $value
* @param string|null $value
* @return static
*/
public function setValue(?string $value)
Expand Down
Loading
Loading