From bc4d7334865ee6702134fd09ab3c52b156ae6f9a Mon Sep 17 00:00:00 2001 From: Formatter Bot Date: Sun, 4 Apr 2021 15:13:16 +0000 Subject: [PATCH] Automated formatting changes --- Controller/ApiController.php | 30 +++++++++++----------- Controller/BackendController.php | 4 +-- Models/Client.php | 2 +- Models/ClientAttributeMapper.php | 6 ++--- Models/ClientAttributeType.php | 6 +++-- Models/ClientAttributeTypeL11n.php | 4 +-- Models/ClientAttributeTypeMapper.php | 10 ++++---- Theme/Backend/client-profile-items.tpl.php | 1 - 8 files changed, 32 insertions(+), 31 deletions(-) diff --git a/Controller/ApiController.php b/Controller/ApiController.php index ec61221..21a3844 100755 --- a/Controller/ApiController.php +++ b/Controller/ApiController.php @@ -16,28 +16,28 @@ namespace Modules\ClientManagement\Controller; use Modules\Admin\Models\Account; use Modules\Admin\Models\Address; +use Modules\ClientManagement\Models\AttributeValueType; use Modules\ClientManagement\Models\Client; +use Modules\ClientManagement\Models\ClientAttribute; +use Modules\ClientManagement\Models\ClientAttributeMapper; +use Modules\ClientManagement\Models\ClientAttributeType; +use Modules\ClientManagement\Models\ClientAttributeTypeL11n; +use Modules\ClientManagement\Models\ClientAttributeTypeL11nMapper; +use Modules\ClientManagement\Models\ClientAttributeTypeMapper; +use Modules\ClientManagement\Models\ClientAttributeValue; +use Modules\ClientManagement\Models\ClientAttributeValueMapper; use Modules\ClientManagement\Models\ClientMapper; +use Modules\ClientManagement\Models\NullClientAttributeType; +use Modules\ClientManagement\Models\NullClientAttributeValue; use Modules\Media\Models\PathSettings; use Modules\Profile\Models\ContactElementMapper; use Modules\Profile\Models\Profile; +use phpOMS\Message\Http\HttpRequest; use phpOMS\Message\Http\RequestStatusCode; use phpOMS\Message\NotificationLevel; use phpOMS\Message\RequestAbstract; use phpOMS\Message\ResponseAbstract; use phpOMS\Model\Message\FormValidation; -use Modules\ClientManagement\Models\ClientAttribute; -use Modules\ClientManagement\Models\NullClientAttributeType; -use Modules\ClientManagement\Models\NullClientAttributeValue; -use Modules\ClientManagement\Models\ClientAttributeTypeL11n; -use phpOMS\Message\Http\HttpRequest; -use Modules\ClientManagement\Models\ClientAttributeType; -use Modules\ClientManagement\Models\ClientAttributeValue; -use Modules\ClientManagement\Models\AttributeValueType; -use Modules\ClientManagement\Models\ClientAttributeTypeMapper; -use Modules\ClientManagement\Models\ClientAttributeTypeL11nMapper; -use Modules\ClientManagement\Models\ClientAttributeValueMapper; -use Modules\ClientManagement\Models\ClientAttributeMapper; /** * ClientManagement class. @@ -203,10 +203,10 @@ final class ApiController extends Controller */ private function createClientAttributeFromRequest(RequestAbstract $request) : ClientAttribute { - $attribute = new ClientAttribute(); + $attribute = new ClientAttribute(); $attribute->client = (int) $request->getData('client'); - $attribute->type = new NullClientAttributeType((int) $request->getData('type')); - $attribute->value = new NullClientAttributeValue((int) $request->getData('value')); + $attribute->type = new NullClientAttributeType((int) $request->getData('type')); + $attribute->value = new NullClientAttributeValue((int) $request->getData('value')); return $attribute; } diff --git a/Controller/BackendController.php b/Controller/BackendController.php index c46ece2..9764e1e 100755 --- a/Controller/BackendController.php +++ b/Controller/BackendController.php @@ -17,6 +17,7 @@ namespace Modules\ClientManagement\Controller; use Modules\Billing\Models\BillTypeL11n; use Modules\Billing\Models\SalesBillMapper; use Modules\ClientManagement\Models\ClientMapper; +use Modules\Media\Models\Media; use phpOMS\Asset\AssetType; use phpOMS\Contract\RenderableInterface; use phpOMS\Localization\Money; @@ -24,7 +25,6 @@ use phpOMS\Message\RequestAbstract; use phpOMS\Message\ResponseAbstract; use phpOMS\Stdlib\Base\SmartDateTime; use phpOMS\Views\View; -use Modules\Media\Models\Media; /** * ClientManagement class. @@ -125,7 +125,7 @@ final class BackendController extends Controller ::with('language', $response->getLanguage(), [BillTypeL11n::class]) ::getNewestClientInvoices($client->getId(), 5); $monthlySalesCosts = SalesBillMapper::getClientMonthlySalesCosts($client->getId(), (new SmartDateTime('now'))->createModify(-1), new SmartDateTime('now')); - $items = SalesBillMapper::getClientItem($client->getId(), (new SmartDateTime('now'))->createModify(-1), new SmartDateTime('now')); + $items = SalesBillMapper::getClientItem($client->getId(), (new SmartDateTime('now'))->createModify(-1), new SmartDateTime('now')); } else { $ytd = new Money(); $mtd = new Money(); diff --git a/Models/Client.php b/Models/Client.php index 308aa33..ead9223 100755 --- a/Models/Client.php +++ b/Models/Client.php @@ -18,10 +18,10 @@ use Modules\Admin\Models\Address; use Modules\Admin\Models\NullAddress; use Modules\Editor\Models\EditorDoc; use Modules\Media\Models\Media; +use Modules\Media\Models\NullMedia; use Modules\Profile\Models\ContactElement; use Modules\Profile\Models\NullContactElement; use Modules\Profile\Models\Profile; -use Modules\Media\Models\NullMedia; /** * Account class. diff --git a/Models/ClientAttributeMapper.php b/Models/ClientAttributeMapper.php index 1eceb4e..ea637d4 100755 --- a/Models/ClientAttributeMapper.php +++ b/Models/ClientAttributeMapper.php @@ -33,10 +33,10 @@ final class ClientAttributeMapper extends DataMapperAbstract * @since 1.0.0 */ protected static array $columns = [ - 'clientmgmt_client_attr_id' => ['name' => 'clientmgmt_client_attr_id', 'type' => 'int', 'internal' => 'id'], + 'clientmgmt_client_attr_id' => ['name' => 'clientmgmt_client_attr_id', 'type' => 'int', 'internal' => 'id'], 'clientmgmt_client_attr_client' => ['name' => 'clientmgmt_client_attr_client', 'type' => 'int', 'internal' => 'client'], - 'clientmgmt_client_attr_type' => ['name' => 'clientmgmt_client_attr_type', 'type' => 'int', 'internal' => 'type'], - 'clientmgmt_client_attr_value' => ['name' => 'clientmgmt_client_attr_value', 'type' => 'int', 'internal' => 'value'], + 'clientmgmt_client_attr_type' => ['name' => 'clientmgmt_client_attr_type', 'type' => 'int', 'internal' => 'type'], + 'clientmgmt_client_attr_value' => ['name' => 'clientmgmt_client_attr_value', 'type' => 'int', 'internal' => 'value'], ]; /** diff --git a/Models/ClientAttributeType.php b/Models/ClientAttributeType.php index 474f430..b52a25b 100755 --- a/Models/ClientAttributeType.php +++ b/Models/ClientAttributeType.php @@ -68,7 +68,9 @@ class ClientAttributeType implements \JsonSerializable, ArrayableInterface * * @var string | ClientAttributeTypeL11n */ - protected string | ClientAttributeTypeL11n $l11n; + protected string | + + ClientAttributeTypeL11n $l11n; /** * Possible default attribute values @@ -105,7 +107,7 @@ class ClientAttributeType implements \JsonSerializable, ArrayableInterface * Set l11n * * @param string|ClientAttributeTypeL11n $l11n Tag article l11n - * @param string $lang Language + * @param string $lang Language * * @return void * diff --git a/Models/ClientAttributeTypeL11n.php b/Models/ClientAttributeTypeL11n.php index acdef52..27fb954 100755 --- a/Models/ClientAttributeTypeL11n.php +++ b/Models/ClientAttributeTypeL11n.php @@ -65,8 +65,8 @@ ClientAttributeType $type = 0; * Constructor. * * @param int|ClientAttributeType $type Attribute type - * @param string $title Localized title - * @param string $language Language + * @param string $title Localized title + * @param string $language Language * * @since 1.0.0 */ diff --git a/Models/ClientAttributeTypeMapper.php b/Models/ClientAttributeTypeMapper.php index 56ffb06..29339fa 100755 --- a/Models/ClientAttributeTypeMapper.php +++ b/Models/ClientAttributeTypeMapper.php @@ -33,11 +33,11 @@ final class ClientAttributeTypeMapper extends DataMapperAbstract * @since 1.0.0 */ protected static array $columns = [ - 'clientmgmt_attr_type_id' => ['name' => 'clientmgmt_attr_type_id', 'type' => 'int', 'internal' => 'id'], - 'clientmgmt_attr_type_name' => ['name' => 'clientmgmt_attr_type_name', 'type' => 'string', 'internal' => 'name', 'autocomplete' => true], - 'clientmgmt_attr_type_fields' => ['name' => 'clientmgmt_attr_type_fields', 'type' => 'int', 'internal' => 'fields'], - 'clientmgmt_attr_type_custom' => ['name' => 'clientmgmt_attr_type_custom', 'type' => 'bool', 'internal' => 'custom'], - 'clientmgmt_attr_type_pattern' => ['name' => 'clientmgmt_attr_type_pattern', 'type' => 'bool', 'internal' => 'validationPattern'], + 'clientmgmt_attr_type_id' => ['name' => 'clientmgmt_attr_type_id', 'type' => 'int', 'internal' => 'id'], + 'clientmgmt_attr_type_name' => ['name' => 'clientmgmt_attr_type_name', 'type' => 'string', 'internal' => 'name', 'autocomplete' => true], + 'clientmgmt_attr_type_fields' => ['name' => 'clientmgmt_attr_type_fields', 'type' => 'int', 'internal' => 'fields'], + 'clientmgmt_attr_type_custom' => ['name' => 'clientmgmt_attr_type_custom', 'type' => 'bool', 'internal' => 'custom'], + 'clientmgmt_attr_type_pattern' => ['name' => 'clientmgmt_attr_type_pattern', 'type' => 'bool', 'internal' => 'validationPattern'], 'clientmgmt_attr_type_required' => ['name' => 'clientmgmt_attr_type_required', 'type' => 'bool', 'internal' => 'isRequired'], ]; diff --git a/Theme/Backend/client-profile-items.tpl.php b/Theme/Backend/client-profile-items.tpl.php index 531a6a3..af8053a 100644 --- a/Theme/Backend/client-profile-items.tpl.php +++ b/Theme/Backend/client-profile-items.tpl.php @@ -12,7 +12,6 @@ */ declare(strict_types=1); -use Modules\Media\Models\NullMedia; use phpOMS\Uri\UriFactory; /** @var \phpOMS\Views\View $this */