1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 05:02:36 +01:00

Static analysis cleanup

This commit is contained in:
David Bomba 2023-04-26 20:57:30 +10:00
parent d8da1f8fea
commit 2b83235572
6 changed files with 24 additions and 14 deletions

View File

@ -450,9 +450,9 @@ class Credit extends BaseModel
/**
* Access the invoice calculator object.
*
* @return \stdClass The invoice calculator object getters
* @return InvoiceSumInclusive | InvoiceSum The invoice calculator object getters
*/
public function calc()
public function calc(): InvoiceSumInclusive | InvoiceSum
{
$credit_calc = null;

View File

@ -666,7 +666,7 @@ class Invoice extends BaseModel
*
* @return InvoiceSumInclusive | InvoiceSum The invoice calculator object getters
*/
public function calc()
public function calc(): InvoiceSumInclusive | InvoiceSum
{
$invoice_calc = null;

View File

@ -353,19 +353,14 @@ class PurchaseOrder extends BaseModel
switch ($status) {
case self::STATUS_DRAFT:
return '<h5><span class="badge badge-light">'.ctrans('texts.draft').'</span></h5>';
break;
case self::STATUS_SENT:
return '<h5><span class="badge badge-primary">'.ctrans('texts.sent').'</span></h5>';
break;
case self::STATUS_ACCEPTED:
return '<h5><span class="badge badge-primary">'.ctrans('texts.accepted').'</span></h5>';
break;
case self::STATUS_CANCELLED:
return '<h5><span class="badge badge-secondary">'.ctrans('texts.cancelled').'</span></h5>';
break;
default:
// code...
break;
return '<h5><span class="badge badge-primary">'.ctrans('texts.sent').'</span></h5>';
}
}
@ -491,7 +486,12 @@ class PurchaseOrder extends BaseModel
return $this->morphMany(Document::class, 'documentable');
}
public function calc()
/**
* Access the invoice calculator object.
*
* @return InvoiceSumInclusive | InvoiceSum The invoice calculator object getters
*/
public function calc(): InvoiceSumInclusive | InvoiceSum
{
$purchase_order_calc = null;

View File

@ -393,9 +393,9 @@ class Quote extends BaseModel
/**
* Access the quote calculator object.
*
* @return \stdClass The quote calculator object getters
* @return InvoiceSumInclusive | InvoiceSum The quote calculator object getters
*/
public function calc()
public function calc(): InvoiceSumInclusive | InvoiceSum
{
$quote_calc = null;

View File

@ -697,7 +697,12 @@ class RecurringInvoice extends BaseModel
}
}
public function calc()
/**
* Access the invoice calculator object.
*
* @return InvoiceSumInclusive | InvoiceSum The invoice calculator object getters
*/
public function calc(): InvoiceSumInclusive | InvoiceSum
{
$invoice_calc = null;

View File

@ -604,7 +604,12 @@ class RecurringQuote extends BaseModel
}
}
public function calc()
/**
* Access the invoice calculator object.
*
* @return InvoiceSumInclusive | InvoiceSum The invoice calculator object getters
*/
public function calc(): InvoiceSumInclusive | InvoiceSum
{
$invoice_calc = null;