Skip to content

Commit

Permalink
Codestyle and PHPDoc fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
HorstOeko committed Sep 10, 2024
1 parent 1ad37b5 commit 2055784
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 25 deletions.
16 changes: 8 additions & 8 deletions src/ZugferdDocumentBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ public function setDocumentSeller(string $name, ?string $id = null, ?string $des
/**
* Add an id to the document seller
*
* @param string|null $id __BT-29, From BASIC WL__ An identifier of the seller. In many systems, seller identification is key information. Multiple seller IDs can be assigned or specified. They can be differentiated by using different identification schemes. If no scheme is given, it should be known to the buyer and seller, e.g. a previously exchanged, buyer-assigned identifier of the seller
* @param string $id __BT-29, From BASIC WL__ An identifier of the seller. In many systems, seller identification is key information. Multiple seller IDs can be assigned or specified. They can be differentiated by using different identification schemes. If no scheme is given, it should be known to the buyer and seller, e.g. a previously exchanged, buyer-assigned identifier of the seller
* @return ZugferdDocumentBuilder
*/
public function addDocumentSellerId(string $id): ZugferdDocumentBuilder
Expand Down Expand Up @@ -572,7 +572,7 @@ public function setDocumentBuyer(string $name, ?string $id = null, ?string $desc
/**
* Add an id to the document buyer
*
* @param string|null $id __BT-46, From BASIC WL__ An identifier of the buyer. In many systems, buyer identification is key information. Multiple buyer IDs can be assigned or specified. They can be differentiated by using different identification schemes. If no scheme is given, it should be known to the buyer and buyer, e.g. a previously exchanged, seller-assigned identifier of the buyer
* @param string $id __BT-46, From BASIC WL__ An identifier of the buyer. In many systems, buyer identification is key information. Multiple buyer IDs can be assigned or specified. They can be differentiated by using different identification schemes. If no scheme is given, it should be known to the buyer and buyer, e.g. a previously exchanged, seller-assigned identifier of the buyer
* @return ZugferdDocumentBuilder
*/
public function addDocumentBuyerId(string $id): ZugferdDocumentBuilder
Expand Down Expand Up @@ -1027,7 +1027,7 @@ public function setDocumentShipTo(?string $name, ?string $id = null, ?string $de
/**
* Add an id to the Ship-to Trade Party
*
* @param string|null $id __BT-71, From BASIC WL__ An identifier for the place where the goods are delivered or where the services are provided. Multiple IDs can be assigned or specified. They can be differentiated by using different identification schemes. If no scheme is given, it should be known to the buyer and seller, e.g. a previously exchanged identifier assigned by the buyer or seller.
* @param string $id __BT-71, From BASIC WL__ An identifier for the place where the goods are delivered or where the services are provided. Multiple IDs can be assigned or specified. They can be differentiated by using different identification schemes. If no scheme is given, it should be known to the buyer and seller, e.g. a previously exchanged identifier assigned by the buyer or seller.
* @return ZugferdDocumentBuilder
*/
public function addDocumentShipTolId(string $id): ZugferdDocumentBuilder
Expand Down Expand Up @@ -1184,7 +1184,7 @@ public function setDocumentUltimateShipTo(string $name, ?string $id = null, ?str
* __Notes__
* - This is only available in the EXTENDED profile
*
* @param string|null $id
* @param string $id
* Identification of the different end recipient. Multiple IDs can be assigned or specified. They can be
* differentiated by using different identification schemes.
* @return ZugferdDocumentBuilder
Expand Down Expand Up @@ -1372,7 +1372,7 @@ public function setDocumentShipFrom(string $name, ?string $id = null, ?string $d
* __Notes__
* - This is only available in the EXTENDED profile
*
* @param string|null $id
* @param string $id
* An identifier for the party. Multiple IDs can be assigned or specified. They can be differentiated by using
* different identification schemes. If no scheme is given, it should be known to the buyer and seller, e.g.
* a previously exchanged identifier assigned by the buyer or seller.
Expand Down Expand Up @@ -1558,7 +1558,7 @@ public function setDocumentInvoicer(string $name, ?string $id = null, ?string $d
* __Notes__
* - This is only available in the EXTENDED profile
*
* @param string|null $id
* @param string $id
* An identifier for the party. Multiple IDs can be assigned or specified. They can be differentiated by using
* different identification schemes. If no scheme is given, it should be known to the buyer and seller, e.g.
* a previously exchanged identifier assigned by the buyer or seller.
Expand Down Expand Up @@ -1749,7 +1749,7 @@ public function setDocumentInvoicee(string $name, ?string $id = null, ?string $d
* __Notes__
* - This is only available in the EXTENDED profile
*
* @param string|null $id
* @param string $id
* An identifier for the party. Multiple IDs can be assigned or specified. They can be differentiated by using
* different identification schemes. If no scheme is given, it should be known to the buyer and seller, e.g.
* a previously exchanged identifier assigned by the buyer or seller.
Expand Down Expand Up @@ -1931,7 +1931,7 @@ public function setDocumentPayee(string $name, ?string $id = null, ?string $desc
/**
* Add an id to the payee trade party
*
* @param string|null $id __BT-60, From BASIC WL__ An identifier for the party. Multiple IDs can be assigned or specified. They can be differentiated by using different identification schemes. If no scheme is given, it should be known to the buyer and seller, e.g. a previously exchanged identifier assigned by the buyer or seller.
* @param string $id __BT-60, From BASIC WL__ An identifier for the party. Multiple IDs can be assigned or specified. They can be differentiated by using different identification schemes. If no scheme is given, it should be known to the buyer and seller, e.g. a previously exchanged identifier assigned by the buyer or seller.
* @return ZugferdDocumentBuilder
*/
public function addDocumentPayeeId(string $id): ZugferdDocumentBuilder
Expand Down
6 changes: 3 additions & 3 deletions src/ZugferdDocumentReader.php
Original file line number Diff line number Diff line change
Expand Up @@ -4392,7 +4392,7 @@ public function nextDocumentPositionProductCharacteristic(): bool
* beide Listen kombiniert anzuwenden sind.
* - Codeliste: Rec. N°21 Vollständige Liste, In Recommendation N°20 Intro 2.a ist beschrieben, dass
* beide Listen kombiniert anzuwenden sind.
* @return ZugferdDocumentBuilder
* @return ZugferdDocumentReader
*/
public function getDocumentPositionProductCharacteristic(?string &$description, ?string &$value, ?string &$typecode, ?float &$valueMeasure, ?string &$valueMeasureUnitCode): ZugferdDocumentReader
{
Expand Down Expand Up @@ -4462,7 +4462,7 @@ public function nextDocumentPositionProductClassification(): bool
* __Note__: The identification scheme must be selected from the entries from UNTDID 7143.
* @param string|null $listVersionID
* The version of the identification scheme
* @return ZugferdDocumentBuilder
* @return ZugferdDocumentReader
*/
public function getDocumentPositionProductClassification(?string &$classCode, ?string &$className, ?string &$listID, ?string &$listVersionID): ZugferdDocumentReader
{
Expand Down Expand Up @@ -4540,7 +4540,7 @@ public function nextDocumentPositionReferencedProduct(): bool
* Included quantity
* @param string $unitCode
* Unit of measurement of the included quantity
* @return ZugferdDocumentBuilder
* @return ZugferdDocumentReader
*/
public function getDocumentPositionReferencedProduct(?string &$name, ?string &$description, ?string &$sellerAssignedID, ?string &$buyerAssignedID, ?array &$globalID, ?float &$unitQuantity, ?string &$unitCode): ZugferdDocumentReader
{
Expand Down
11 changes: 5 additions & 6 deletions src/ZugferdKositValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,27 +111,27 @@ class ZugferdKositValidator
/**
* Message Type "Internal Error"
*/
private const MSG_TYPE_INTERNALERROR = 'internalerror';
protected const MSG_TYPE_INTERNALERROR = 'internalerror';

/**
* Message Type "Validation Error"
*/
private const MSG_TYPE_VALIDATIONERROR = 'validationerror';
protected const MSG_TYPE_VALIDATIONERROR = 'validationerror';

/**
* Message Type "Validation Warning"
*/
private const MSG_TYPE_VALIDATIONWARNING = 'validationwarning';
protected const MSG_TYPE_VALIDATIONWARNING = 'validationwarning';

/**
* Message Type "Validation info"
*/
private const MSG_TYPE_VALIDATIONINFORMATION = 'validationinformation';
protected const MSG_TYPE_VALIDATIONINFORMATION = 'validationinformation';

/**
* Message Type "Process Output"
*/
private const MSG_TYPE_PROCESSOUTPUT = 'processoutput';
protected const MSG_TYPE_PROCESSOUTPUT = 'processoutput';

/**
* Constructor
Expand Down Expand Up @@ -807,7 +807,6 @@ private function cleanupBaseDirectoryInternal(string $directoryToRemove): void
*
* @param array $command
* @param string $workingdirectory
* @param string $processOutput
* @return boolean
*/
private function runValidationApplication(array $command, string $workingdirectory): bool
Expand Down
5 changes: 2 additions & 3 deletions src/codelists/ZugferdSchemeIdentifiers.php
Original file line number Diff line number Diff line change
Expand Up @@ -1039,7 +1039,7 @@ class ZugferdSchemeIdentifiers

/**
* Registre du Commerce et de l’Industrie : RCI
*/
*/
const ISO_6523_0206 = '0206';

/**
Expand Down Expand Up @@ -1071,10 +1071,9 @@ class ZugferdSchemeIdentifiers
* Finnish Organization Identifier
*/
const ISO_6523_0212 = '0212';

/**
* Finnish Organization Value Add Tax Identifier
*/
const ISO_6523_0213 = '0213';

}
2 changes: 1 addition & 1 deletion src/exception/ZugferdUnknownProfileIdException.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class ZugferdUnknownProfileIdException extends Exception
/**
* The context of the type element
*
* @var string
* @var integer
*/
private $profileId = 0;

Expand Down
8 changes: 4 additions & 4 deletions tests/testcases/BuilderMinimumTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -194,14 +194,14 @@ public function testSetDocumentSeller(): void
*/
public function testAddDocumentSellerId(): void
{
$this->assertXPathNotExists('/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:ID', 0);
$this->assertXPathNotExists('/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:ID', 1);
$this->assertXPathNotExistsWithIndex('/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:ID', 0);
$this->assertXPathNotExistsWithIndex('/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:ID', 1);

(self::$document)->addDocumentSellerId('549911');

$this->disableRenderXmlContent();
$this->assertXPathNotExists('/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:ID', 0);
$this->assertXPathNotExists('/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:ID', 1);
$this->assertXPathNotExistsWithIndex('/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:ID', 0);
$this->assertXPathNotExistsWithIndex('/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:ID', 1);
}

/**
Expand Down

0 comments on commit 2055784

Please sign in to comment.