This commit is contained in:
Dennis Eichhorn 2023-09-10 18:58:34 +00:00
parent ffc388e0e0
commit ff772187d8
3 changed files with 8 additions and 8 deletions

View File

@ -327,7 +327,7 @@ final class ApiAttributeController extends Controller
return;
}
/** @var \Modules\ClientManagement\Models\ClientAttributeTypeL11n $clientAttributeTypeL11n */
/** @var BaseStringL11n $clientAttributeTypeL11n */
$clientAttributeTypeL11n = ClientAttributeTypeL11nMapper::get()->where('id', (int) $request->getData('id'))->execute();
$this->deleteModel($request->header->account, $clientAttributeTypeL11n, ClientAttributeTypeL11nMapper::class, 'client_attribute_type_l11n', $request->getOrigin());
$this->createStandardDeleteResponse($request, $response, $clientAttributeTypeL11n);
@ -387,7 +387,7 @@ final class ApiAttributeController extends Controller
return;
}
/** @var \Modules\ClientManagement\Models\ClientAttributeType $clientAttributeType */
/** @var AttributeType $clientAttributeType */
$clientAttributeType = ClientAttributeTypeMapper::get()->where('id', (int) $request->getData('id'))->execute();
$this->deleteModel($request->header->account, $clientAttributeType, ClientAttributeTypeMapper::class, 'client_attribute_type', $request->getOrigin());
$this->createStandardDeleteResponse($request, $response, $clientAttributeType);
@ -418,7 +418,7 @@ final class ApiAttributeController extends Controller
/** @var AttributeValue $old */
$old = ClientAttributeValueMapper::get()->where('id', (int) $request->getData('id'))->execute();
/** @var \Modules\Attribute\Models\Attribute $type */
/** @var \Modules\Attribute\Models\Attribute $attr */
$attr = ClientAttributeMapper::get()
->with('type')
->where('id', $request->getDataInt('attribute') ?? 0)
@ -514,7 +514,7 @@ final class ApiAttributeController extends Controller
return;
}
/** @var \Modules\ClientManagement\Models\ClientAttributeValueL11n $clientAttributeValueL11n */
/** @var BaseStringL11n $clientAttributeValueL11n */
$clientAttributeValueL11n = ClientAttributeValueL11nMapper::get()->where('id', (int) $request->getData('id'))->execute();
$this->deleteModel($request->header->account, $clientAttributeValueL11n, ClientAttributeValueL11nMapper::class, 'client_attribute_value_l11n', $request->getOrigin());
$this->createStandardDeleteResponse($request, $response, $clientAttributeValueL11n);

View File

@ -135,7 +135,7 @@ final class ApiController extends Controller
'vat_validation',
self::NAME,
(string) $client->id,
\json_encode($validate),
(string) \json_encode($validate),
(int) \ip2long($request->getOrigin())
);

View File

@ -15,9 +15,9 @@ declare(strict_types=1);
namespace Modules\ClientManagement\Controller;
use Modules\Billing\Models\SalesBillMapper;
use Modules\ClientManagement\Models\ClientAttributeTypeL11nMapper;
use Modules\ClientManagement\Models\ClientAttributeTypeMapper;
use Modules\ClientManagement\Models\ClientAttributeValueMapper;
use Modules\ClientManagement\Models\Attribute\ClientAttributeTypeL11nMapper;
use Modules\ClientManagement\Models\Attribute\ClientAttributeTypeMapper;
use Modules\ClientManagement\Models\Attribute\ClientAttributeValueMapper;
use Modules\ClientManagement\Models\ClientMapper;
use Modules\Media\Models\MediaMapper;
use Modules\Media\Models\MediaTypeMapper;