Skip to content
Code-Schnipsel Gruppen Projekte
Commit 171bc030 erstellt von Henning Leutz's avatar Henning Leutz :martial_arts_uniform:
Dateien durchsuchen

style: psr12 code style

Übergeordneter 9cf11171
Keine zugehörigen Branchen gefunden
Keine zugehörigen Tags gefunden
2 Merge Requests!87Next 2.x,!80Update 'next-3.x' with latest changes from 'main'
Pipeline-Nr. 13623 mit Warnungen bestanden
...@@ -243,10 +243,9 @@ public static function onUserSaveBegin(QUI\Users\User $User): void ...@@ -243,10 +243,9 @@ public static function onUserSaveBegin(QUI\Users\User $User): void
* @param QUI\ERP\Comments $Comments * @param QUI\ERP\Comments $Comments
*/ */
public static function onQuiqqerErpGetCommentsByUser( public static function onQuiqqerErpGetCommentsByUser(
QUI\Users\User $User, QUI\Users\User $User,
QUI\ERP\Comments $Comments QUI\ERP\Comments $Comments
): void ): void {
{
$Handler = Handler::getInstance(); $Handler = Handler::getInstance();
$invoices = $Handler->getInvoicesByUser($User); $invoices = $Handler->getInvoicesByUser($User);
...@@ -262,10 +261,9 @@ public static function onQuiqqerErpGetCommentsByUser( ...@@ -262,10 +261,9 @@ public static function onQuiqqerErpGetCommentsByUser(
* @param QUI\ERP\Comments $Comments * @param QUI\ERP\Comments $Comments
*/ */
public static function onQuiqqerErpGetHistoryByUser( public static function onQuiqqerErpGetHistoryByUser(
QUI\Users\User $User, QUI\Users\User $User,
QUI\ERP\Comments $Comments QUI\ERP\Comments $Comments
): void ): void {
{
$Handler = Handler::getInstance(); $Handler = Handler::getInstance();
$invoices = $Handler->getInvoicesByUser($User); $invoices = $Handler->getInvoicesByUser($User);
...@@ -306,8 +304,7 @@ public static function onQuiqqerErpOutputSendMailBefore( ...@@ -306,8 +304,7 @@ public static function onQuiqqerErpOutputSendMailBefore(
string $recipient, string $recipient,
QUI\Mail\Mailer $Mailer, QUI\Mail\Mailer $Mailer,
string $mailFile = '' string $mailFile = ''
): void ): void {
{
$allowedEntityTypes = [ $allowedEntityTypes = [
OutputProviderInvoice::getEntityType(), OutputProviderInvoice::getEntityType(),
OutputProviderCancelled::getEntityType(), OutputProviderCancelled::getEntityType(),
...@@ -362,7 +359,7 @@ public static function onQuiqqerErpOutputSendMailBefore( ...@@ -362,7 +359,7 @@ public static function onQuiqqerErpOutputSendMailBefore(
public static function onQuiqqerHtmlToPDFCreated(QUI\HtmlToPdf\Document $Document, $filename): void public static function onQuiqqerHtmlToPDFCreated(QUI\HtmlToPdf\Document $Document, $filename): void
{ {
$Entity = $Document->getAttribute('Entity'); $Entity = $Document->getAttribute('Entity');
if (!($Entity instanceof Invoice)) { if (!($Entity instanceof Invoice)) {
return; return;
} }
...@@ -378,7 +375,6 @@ public static function onQuiqqerHtmlToPDFCreated(QUI\HtmlToPdf\Document $Documen ...@@ -378,7 +375,6 @@ public static function onQuiqqerHtmlToPDFCreated(QUI\HtmlToPdf\Document $Documen
$pdfBuilder = new ZugferdDocumentPdfBuilder($document, $filename); $pdfBuilder = new ZugferdDocumentPdfBuilder($document, $filename);
$pdfBuilder->generateDocument()->saveDocument($filename); $pdfBuilder->generateDocument()->saveDocument($filename);
} }
} }
/** /**
......
...@@ -441,8 +441,7 @@ protected static function verificateField( ...@@ -441,8 +441,7 @@ protected static function verificateField(
array|string $eMessage = 'Error occurred', array|string $eMessage = 'Error occurred',
int $eCode = 0, int $eCode = 0,
array $eContext = [] array $eContext = []
): void ): void {
{
if (empty($value)) { if (empty($value)) {
throw new Exception($eMessage, $eCode, $eContext); throw new Exception($eMessage, $eCode, $eContext);
} }
...@@ -459,9 +458,8 @@ protected static function verificateField( ...@@ -459,9 +458,8 @@ protected static function verificateField(
*/ */
public static function getInvoiceFilename( public static function getInvoiceFilename(
QUI\ERP\Accounting\Invoice\Invoice|InvoiceTemporary $Invoice, QUI\ERP\Accounting\Invoice\Invoice|InvoiceTemporary $Invoice,
QUI\Locale $Locale = null QUI\Locale $Locale = null
): string ): string {
{
if ( if (
!($Invoice instanceof QUI\ERP\Accounting\Invoice\Invoice) && !($Invoice instanceof QUI\ERP\Accounting\Invoice\Invoice) &&
!($Invoice instanceof QUI\ERP\Accounting\Invoice\InvoiceTemporary) !($Invoice instanceof QUI\ERP\Accounting\Invoice\InvoiceTemporary)
...@@ -526,10 +524,9 @@ public static function getInvoiceFilename( ...@@ -526,10 +524,9 @@ public static function getInvoiceFilename(
* @return int|float * @return int|float
*/ */
public static function roundInvoiceSum( public static function roundInvoiceSum(
float|int $amount, float|int $amount,
QUI\ERP\Currency\Currency $Currency = null QUI\ERP\Currency\Currency $Currency = null
): float|int ): float|int {
{
if ($Currency === null) { if ($Currency === null) {
$Currency = QUI\ERP\Defaults::getCurrency(); $Currency = QUI\ERP\Defaults::getCurrency();
...@@ -570,10 +567,9 @@ public static function getInvoiceTimeForPaymentDate(InvoiceTemporary|Invoice $In ...@@ -570,10 +567,9 @@ public static function getInvoiceTimeForPaymentDate(InvoiceTemporary|Invoice $In
* @return array * @return array
*/ */
public static function getVatTextArrayFromVatArray( public static function getVatTextArrayFromVatArray(
array|string $vatArray, array|string $vatArray,
QUI\ERP\Currency\Currency $Currency QUI\ERP\Currency\Currency $Currency
): array ): array {
{
if (is_string($vatArray)) { if (is_string($vatArray)) {
$vatArray = json_decode($vatArray, true); $vatArray = json_decode($vatArray, true);
} }
...@@ -676,9 +672,8 @@ public static function addressRequirementThreshold(): float ...@@ -676,9 +672,8 @@ public static function addressRequirementThreshold(): float
public static function getElectronicInvoice( public static function getElectronicInvoice(
InvoiceTemporary|QUI\ERP\Accounting\Invoice\Invoice $Invoice, InvoiceTemporary|QUI\ERP\Accounting\Invoice\Invoice $Invoice,
$type = ZugferdProfiles::PROFILE_EN16931 $type = ZugferdProfiles::PROFILE_EN16931
): ZugferdDocumentBuilder ): ZugferdDocumentBuilder {
{
$document = ZugferdDocumentBuilder::CreateNew($type); $document = ZugferdDocumentBuilder::CreateNew($type);
$date = $Invoice->getAttribute('date'); $date = $Invoice->getAttribute('date');
......
0% Lade oder .
You are about to add 0 people to the discussion. Proceed with caution.
Bearbeitung dieser Nachricht zuerst beenden!
Bitte registrieren oder zum Kommentieren