Skip to content

Commit

Permalink
Reformatted code (using PSR12-Ruleset)
Browse files Browse the repository at this point in the history
  • Loading branch information
HorstOeko committed Aug 17, 2023
1 parent bb55417 commit 772dd2b
Show file tree
Hide file tree
Showing 26 changed files with 15 additions and 80 deletions.
20 changes: 10 additions & 10 deletions src/ZugferdDocumentAbstractPdfBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,21 +102,21 @@ public function downloadString(string $toFilename): string
*
* @return string
*/
protected abstract function getXmlContent(): string;
abstract protected function getXmlContent(): string;

/**
* Get the filename of the XML to attach
*
* @return string
*/
protected abstract function getXmlAttachmentFilename(): string;
abstract protected function getXmlAttachmentFilename(): string;

/**
* Get the XMP name for the XML to attach
*
* @return string
*/
protected abstract function getXmlAttachmentXmpName(): string;
abstract protected function getXmlAttachmentXmpName(): string;

/**
* Internal function which sets up the PDF
Expand Down Expand Up @@ -262,12 +262,12 @@ protected function extractInvoiceInformations(): array
$docTypeCode = $docTypeXpath->item(0)->nodeValue;

switch ($docTypeCode) {
case ZugferdInvoiceType::CREDITNOTE:
$docTypeName = 'Credit Note';
break;
default:
$docTypeName = 'Invoice';
break;
case ZugferdInvoiceType::CREDITNOTE:
$docTypeName = 'Credit Note';
break;
default:
$docTypeName = 'Invoice';
break;
}

$invoiceInformation = array(
Expand Down Expand Up @@ -295,4 +295,4 @@ private function pdfDataIsFile($pdfData): bool
return false;
}
}
}
}
2 changes: 1 addition & 1 deletion src/ZugferdDocumentBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ public function setDocumentBuyerReference(string $buyerreference): ZugferdDocume
* standard, two syntaxes are permitted for displaying electronic invoices: Universal Business Language (UBL) and UN/CEFACT
* Cross Industry Invoice (CII).
*
* @param string $routingId
* @param string $routingId
* The routing ID
* @return ZugferdDocumentBuilder
*/
Expand Down
3 changes: 0 additions & 3 deletions src/entities/minimum/qdt/CountryIDType.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,4 @@ public function __toString()
{
return strval($this->__value);
}


}

3 changes: 0 additions & 3 deletions src/entities/minimum/qdt/CurrencyCodeType.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,4 @@ public function __toString()
{
return strval($this->__value);
}


}

3 changes: 0 additions & 3 deletions src/entities/minimum/qdt/DocumentCodeType.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,4 @@ public function __toString()
{
return strval($this->__value);
}


}

3 changes: 0 additions & 3 deletions src/entities/minimum/ram/DocumentContextParameterType.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,4 @@ public function setID(\horstoeko\zugferd\entities\minimum\udt\IDType $iD)
$this->iD = $iD;
return $this;
}


}

3 changes: 0 additions & 3 deletions src/entities/minimum/ram/ExchangedDocumentContextType.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,4 @@ public function setGuidelineSpecifiedDocumentContextParameter(\horstoeko\zugferd
$this->guidelineSpecifiedDocumentContextParameter = $guidelineSpecifiedDocumentContextParameter;
return $this;
}


}

3 changes: 0 additions & 3 deletions src/entities/minimum/ram/ExchangedDocumentType.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,4 @@ public function setIssueDateTime(\horstoeko\zugferd\entities\minimum\udt\DateTim
$this->issueDateTime = $issueDateTime;
return $this;
}


}

3 changes: 0 additions & 3 deletions src/entities/minimum/ram/HeaderTradeAgreementType.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,4 @@ public function setBuyerOrderReferencedDocument(?\horstoeko\zugferd\entities\min
$this->buyerOrderReferencedDocument = $buyerOrderReferencedDocument;
return $this;
}


}

1 change: 0 additions & 1 deletion src/entities/minimum/ram/HeaderTradeDeliveryType.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,3 @@ class HeaderTradeDeliveryType


}

3 changes: 0 additions & 3 deletions src/entities/minimum/ram/HeaderTradeSettlementType.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,4 @@ public function setSpecifiedTradeSettlementHeaderMonetarySummation(\horstoeko\zu
$this->specifiedTradeSettlementHeaderMonetarySummation = $specifiedTradeSettlementHeaderMonetarySummation;
return $this;
}


}

3 changes: 0 additions & 3 deletions src/entities/minimum/ram/LegalOrganizationType.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,4 @@ public function setID(?\horstoeko\zugferd\entities\minimum\udt\IDType $iD = null
$this->iD = $iD;
return $this;
}


}

3 changes: 0 additions & 3 deletions src/entities/minimum/ram/ReferencedDocumentType.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,4 @@ public function setIssuerAssignedID(\horstoeko\zugferd\entities\minimum\udt\IDTy
$this->issuerAssignedID = $issuerAssignedID;
return $this;
}


}

3 changes: 0 additions & 3 deletions src/entities/minimum/ram/SupplyChainTradeTransactionType.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,4 @@ public function setApplicableHeaderTradeSettlement(\horstoeko\zugferd\entities\m
$this->applicableHeaderTradeSettlement = $applicableHeaderTradeSettlement;
return $this;
}


}

3 changes: 0 additions & 3 deletions src/entities/minimum/ram/TaxRegistrationType.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,4 @@ public function setID(\horstoeko\zugferd\entities\minimum\udt\IDType $iD)
$this->iD = $iD;
return $this;
}


}

3 changes: 0 additions & 3 deletions src/entities/minimum/ram/TradeAddressType.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,4 @@ public function setCountryID($countryID)
$this->countryID = $countryID;
return $this;
}


}

3 changes: 0 additions & 3 deletions src/entities/minimum/ram/TradePartyType.php
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,4 @@ public function setSpecifiedTaxRegistration(array $specifiedTaxRegistration = nu
$this->specifiedTaxRegistration = $specifiedTaxRegistration;
return $this;
}


}

Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,4 @@ public function setDuePayableAmount(\horstoeko\zugferd\entities\minimum\udt\Amou
$this->duePayableAmount = $duePayableAmount;
return $this;
}


}

1 change: 0 additions & 1 deletion src/entities/minimum/rsm/CrossIndustryInvoice.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,3 @@ class CrossIndustryInvoice extends CrossIndustryInvoiceType


}

3 changes: 0 additions & 3 deletions src/entities/minimum/rsm/CrossIndustryInvoiceType.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,4 @@ public function setSupplyChainTradeTransaction(\horstoeko\zugferd\entities\minim
$this->supplyChainTradeTransaction = $supplyChainTradeTransaction;
return $this;
}


}

3 changes: 0 additions & 3 deletions src/entities/minimum/udt/AmountType.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,4 @@ public function setCurrencyID($currencyID)
$this->currencyID = $currencyID;
return $this;
}


}

3 changes: 0 additions & 3 deletions src/entities/minimum/udt/DateTimeType.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,4 @@ public function setDateTimeString(?\horstoeko\zugferd\entities\minimum\udt\DateT
$this->dateTimeString = $dateTimeString;
return $this;
}


}

3 changes: 0 additions & 3 deletions src/entities/minimum/udt/DateTimeType/DateTimeStringAType.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,4 @@ public function setFormat($format)
$this->format = $format;
return $this;
}


}

3 changes: 0 additions & 3 deletions src/entities/minimum/udt/IDType.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,4 @@ public function setSchemeID($schemeID)
$this->schemeID = $schemeID;
return $this;
}


}

3 changes: 0 additions & 3 deletions src/entities/minimum/udt/TextType.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,4 @@ public function __toString()
{
return strval($this->__value);
}


}

8 changes: 4 additions & 4 deletions tests/testcases/issues/Issue10Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public static function setUpBeforeClass(): void

/**
* @covers \horstoeko\zugferd\ZugferdDocumentBuilder::SetDocumentSummation
* @issue #10
* @issue #10
*/
public function testTotalPrepaidAmountPayed(): void
{
Expand All @@ -40,7 +40,7 @@ public function testTotalPrepaidAmountPayed(): void

/**
* @covers \horstoeko\zugferd\ZugferdDocumentBuilder::SetDocumentSummation
* @issue #10
* @issue #10
*/
public function testTotalPrepaidAmountUnpayed(): void
{
Expand All @@ -61,7 +61,7 @@ public function testTotalPrepaidAmountUnpayed(): void

/**
* @covers \horstoeko\zugferd\ZugferdDocumentBuilder::SetDocumentSummation
* @issue #10
* @issue #10
*/
public function testTotalPrepaidAmountIsNull(): void
{
Expand All @@ -79,4 +79,4 @@ public function testTotalPrepaidAmountIsNull(): void
$this->assertXPathNotExistsWithIndex('/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementHeaderMonetarySummation/ram:TotalPrepaidAmount', 0);
$this->assertXPathValueWithIndex('/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementHeaderMonetarySummation/ram:DuePayableAmount', 0, "109.0");
}
}
}

0 comments on commit 772dd2b

Please sign in to comment.