refactor(core): enhance SDK structure and documentation

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
2026-01-18 21:48:25 +03:00
parent 3da69c03e1
commit d214eecebe
378 changed files with 10514 additions and 496 deletions

View File

@@ -1,14 +1,29 @@
<?php
/*
// MODULE_CONTRACT: Defines the data structure for an address.
// RESPONSIBILITY: To hold and type-safely represent address details.
// INPUTS: Raw JSON object from the API response or internal input.
// OUTPUTS: A structured object containing address information.
// LINKS: CreateBeneficiaryRequestData.php (uses this DTO)
*/
namespace Apoloz\AlfaBank\Data\NominalAccounts\Beneficiaries;
// <SECTION name="module_imports" intent="Import the base Spatie Laravel Data class.">
// <BELIEF_STATE "Extending `Spatie\LaravelData\Data` enables automatic casting from JSON and provides other DTO benefits.">
use Spatie\LaravelData\Data;
// </SECTION>
// <SECTION name="class_definition" intent="Define a DTO for address details.">
// <BELIEF_STATE "This DTO provides a clear, type-safe contract for address data, ensuring consistency whenever address information is exchanged.">
class AddressData extends Data
{
// <SECTION name="constructor_properties" intent="Define the properties of an address.">
// <BELIEF_STATE "The constructor captures the `type` of address (e.g., legal, postal), the `address` string itself, and an optional `country`.">
public function __construct(
public string $type,
public string $address,
public ?string $country = null,
) {}
// </SECTION>
}