From 77ac661f52fc1ff43e68a832dd79dd65023283a8 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Thu, 7 Feb 2019 00:05:31 +0100 Subject: [PATCH] phpcs+phpstan fixes --- Admin/Install/Navigation.php | 2 +- Controller/BackendController.php | 6 +++--- Models/Invoice.php | 3 ++- Models/InvoiceElement.php | 2 ++ 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Admin/Install/Navigation.php b/Admin/Install/Navigation.php index 18990cd..01def01 100644 --- a/Admin/Install/Navigation.php +++ b/Admin/Install/Navigation.php @@ -36,7 +36,7 @@ class Navigation * * @since 1.0.0 */ - public static function install(string $path = null, DatabasePool $dbPool = null) : void + public static function install(string $path, DatabasePool $dbPool) : void { \Modules\Navigation\Admin\Installer::installExternal($dbPool, ['path' => __DIR__ . '/Navigation.install.json']); } diff --git a/Controller/BackendController.php b/Controller/BackendController.php index c197711..bf1ac67 100644 --- a/Controller/BackendController.php +++ b/Controller/BackendController.php @@ -40,7 +40,7 @@ final class BackendController extends Controller * @since 1.0.0 * @codeCoverageIgnore */ - public function viewBillingInvoiceList(RequestAbstract $request, ResponseAbstract $response, $data = null) : \Serializable + public function viewBillingInvoiceList(RequestAbstract $request, ResponseAbstract $response, $data = null) : RenderableInterface { $view = new View($this->app, $request, $response); $view->setTemplate('/Modules/Billing/Theme/Backend/invoice-list'); @@ -59,7 +59,7 @@ final class BackendController extends Controller * @since 1.0.0 * @codeCoverageIgnore */ - public function viewBillingInvoiceCreate(RequestAbstract $request, ResponseAbstract $response, $data = null) : \Serializable + public function viewBillingInvoiceCreate(RequestAbstract $request, ResponseAbstract $response, $data = null) : RenderableInterface { $view = new View($this->app, $request, $response); $view->setTemplate('/Modules/Billing/Theme/Backend/invoice-create'); @@ -78,7 +78,7 @@ final class BackendController extends Controller * @since 1.0.0 * @codeCoverageIgnore */ - public function viewBillingPurchaInvoiceList(RequestAbstract $request, ResponseAbstract $response, $data = null) : \Serializable + public function viewBillingPurchaInvoiceList(RequestAbstract $request, ResponseAbstract $response, $data = null) : RenderableInterface { $view = new View($this->app, $request, $response); $view->setTemplate('/Modules/Billing/Theme/Backend/purchase-invoice-list'); diff --git a/Models/Invoice.php b/Models/Invoice.php index 927cb08..e78fa69 100644 --- a/Models/Invoice.php +++ b/Models/Invoice.php @@ -138,10 +138,11 @@ class Invoice implements \JsonSerializable private $trackings = []; private $elements = []; + /** * Reference to other invoice (delivery note/credit note etc). * - * @var \DateTime + * @var int * @since 1.0.0 */ private $reference = 0; diff --git a/Models/InvoiceElement.php b/Models/InvoiceElement.php index c4e5a6c..b4897d6 100644 --- a/Models/InvoiceElement.php +++ b/Models/InvoiceElement.php @@ -14,6 +14,8 @@ declare(strict_types=1); namespace Modules\Billing\Models; +use phpOMS\Localization\Money; + /** * Invoice class. *