diff --git a/Api/Consumer/MessageInterface.php b/Api/Consumer/MessageInterface.php index d470299..32f61da 100644 --- a/Api/Consumer/MessageInterface.php +++ b/Api/Consumer/MessageInterface.php @@ -11,7 +11,7 @@ interface MessageInterface public function setProductId(int $productId); /** - * @return int + * @return int|null */ public function getProductId(): ?int; } diff --git a/Api/Data/CategoryInterface.php b/Api/Data/CategoryInterface.php index acc0f52..be4cfc5 100644 --- a/Api/Data/CategoryInterface.php +++ b/Api/Data/CategoryInterface.php @@ -4,7 +4,6 @@ interface CategoryInterface { - /** * @param string $id * @return void @@ -30,12 +29,12 @@ public function setLeaf(bool $leaf); public function setParent(string $parent); /** - * @return string + * @return string|null */ public function getId(): ?string; /** - * @return string + * @return string|null */ public function getName(): ?string; @@ -45,7 +44,7 @@ public function getName(): ?string; public function getLeaf(): bool; /** - * @return string + * @return string|null */ public function getParent(): ?string; diff --git a/Api/Data/CheckoutForm/AmountInterface.php b/Api/Data/CheckoutForm/AmountInterface.php index c8dc575..0bb8a35 100644 --- a/Api/Data/CheckoutForm/AmountInterface.php +++ b/Api/Data/CheckoutForm/AmountInterface.php @@ -4,10 +4,20 @@ interface AmountInterface { - + /** + * @param float $amount + * @return void + */ public function setAmount(float $amount); + /** + * @return float|null + */ public function getAmount(): ?float; + /** + * @param array $rawData + * @return void + */ public function setRawData(array $rawData); } diff --git a/Api/Data/CheckoutForm/BuyerInterface.php b/Api/Data/CheckoutForm/BuyerInterface.php index 6b116a5..cf1b502 100644 --- a/Api/Data/CheckoutForm/BuyerInterface.php +++ b/Api/Data/CheckoutForm/BuyerInterface.php @@ -4,15 +4,48 @@ interface BuyerInterface { - + /** + * @param string $firstName + * @return void + */ public function setFirstName(string $firstName); + + /** + * @param string $lastName + * @return void + */ public function setLastName(string $lastName); + + /** + * @param string $email + * @return void + */ public function setEmail(string $email); + + /** + * @param string $login + * @return void + */ public function setLogin(string $login); + /** + * @return string|null + */ public function getFirstName(): ?string; + + /** + * @return string|null + */ public function getLastName(): ?string; + + /** + * @return string|null + */ public function getEmail(): ?string; + + /** + * @return string|null + */ public function getLogin(): ?string; /** diff --git a/Api/Data/CheckoutForm/Delivery/AddressInterface.php b/Api/Data/CheckoutForm/Delivery/AddressInterface.php index 491bc94..09c6242 100644 --- a/Api/Data/CheckoutForm/Delivery/AddressInterface.php +++ b/Api/Data/CheckoutForm/Delivery/AddressInterface.php @@ -7,30 +7,103 @@ interface AddressInterface { - + /** + * @param string $firstName + * @return void + */ public function setFirstName(string $firstName); + + /** + * @param string $lastName + * @return void + */ public function setLastName(string $lastName); + + /** + * @param string $phoneNumber + * @return void + */ public function setPhoneNumber(string $phoneNumber); + + /** + * @param string $zipCode + * @return void + */ public function setZipCode(string $zipCode); + + /** + * @param string $city + * @return void + */ public function setCity(string $city); + + /** + * @param string $city + * @return void + */ public function setStreet(string $city); + + /** + * @param string $countryCode + * @return void + */ public function setCountryCode(string $countryCode); + + /** + * @param string $companyName + * @return void + */ public function setCompanyName(string $companyName); + /** + * @return string|null + */ public function getFirstName(): ?string; + + /** + * @return string|null + */ public function getLastName(): ?string; + + /** + * @return string|null + */ public function getPhoneNumber(): ?string; + + /** + * @return string|null + */ public function getZipCode(): ?string; + + /** + * @return string|null + */ public function getCity(): ?string; + + /** + * @return string|null + */ public function getStreet(): ?string; + + /** + * @return string|null + */ public function getCountryCode(): ?string; + + /** + * @return string|null + */ public function getCompanyName(): ?string; + /** + * @param array $rawData + * @return void + */ public function setRawData(array $rawData); /** * @param OrderAddressInterface|QuoteAddressInterface $address * @return void */ - public function fillAddress($address); + public function fillAddress(OrderAddressInterface|QuoteAddressInterface $address); } diff --git a/Api/Data/CheckoutForm/Delivery/CostInterface.php b/Api/Data/CheckoutForm/Delivery/CostInterface.php index 737e2b9..7747365 100644 --- a/Api/Data/CheckoutForm/Delivery/CostInterface.php +++ b/Api/Data/CheckoutForm/Delivery/CostInterface.php @@ -4,10 +4,20 @@ interface CostInterface { - + /** + * @param float $amount + * @return void + */ public function setAmount(float $amount); + /** + * @return float|null + */ public function getAmount(): ?float; + /** + * @param array $rawData + * @return void + */ public function setRawData(array $rawData); } diff --git a/Api/Data/CheckoutForm/Delivery/MethodInterface.php b/Api/Data/CheckoutForm/Delivery/MethodInterface.php index 33e3937..c0f6e47 100644 --- a/Api/Data/CheckoutForm/Delivery/MethodInterface.php +++ b/Api/Data/CheckoutForm/Delivery/MethodInterface.php @@ -4,7 +4,6 @@ interface MethodInterface { - /** * @param string $id * @return void @@ -12,7 +11,7 @@ interface MethodInterface public function setId(string $id); /** - * @return string + * @return string|null */ public function getId(): ?string; diff --git a/Api/Data/CheckoutForm/Delivery/PickupPoint/AddressInterface.php b/Api/Data/CheckoutForm/Delivery/PickupPoint/AddressInterface.php index 677ff09..5a2a9ff 100644 --- a/Api/Data/CheckoutForm/Delivery/PickupPoint/AddressInterface.php +++ b/Api/Data/CheckoutForm/Delivery/PickupPoint/AddressInterface.php @@ -4,7 +4,6 @@ interface AddressInterface { - /** * @param string $street * @return void diff --git a/Api/Data/CheckoutForm/Delivery/PickupPointInterface.php b/Api/Data/CheckoutForm/Delivery/PickupPointInterface.php index e171700..18ad714 100644 --- a/Api/Data/CheckoutForm/Delivery/PickupPointInterface.php +++ b/Api/Data/CheckoutForm/Delivery/PickupPointInterface.php @@ -7,7 +7,6 @@ interface PickupPointInterface { - /** * @param string $id * @return void diff --git a/Api/Data/CheckoutForm/DeliveryInterface.php b/Api/Data/CheckoutForm/DeliveryInterface.php index eb873e7..d04f50f 100644 --- a/Api/Data/CheckoutForm/DeliveryInterface.php +++ b/Api/Data/CheckoutForm/DeliveryInterface.php @@ -9,7 +9,6 @@ interface DeliveryInterface { - /** * @param MethodInterface $method * @return void @@ -30,7 +29,7 @@ public function setCost(CostInterface $cost); /** * @param PickupPointInterface $pickupPoint - * @return mixed + * @return void */ public function setPickupPoint(PickupPointInterface $pickupPoint); diff --git a/Api/Data/CheckoutForm/Invoice/Address/CompanyInterface.php b/Api/Data/CheckoutForm/Invoice/Address/CompanyInterface.php index 65f3b29..e9a8e1c 100644 --- a/Api/Data/CheckoutForm/Invoice/Address/CompanyInterface.php +++ b/Api/Data/CheckoutForm/Invoice/Address/CompanyInterface.php @@ -4,12 +4,31 @@ interface CompanyInterface { - + /** + * @param string $name + * @return void + */ public function setName(string $name); + + /** + * @param string $vatId + * @return void + */ public function setVatId(string $vatId); + /** + * @return string|null + */ public function getName(): ?string; + + /** + * @return string|null + */ public function getVatId(): ?string; + /** + * @param array $rawData + * @return void + */ public function setRawData(array $rawData); } diff --git a/Api/Data/CheckoutForm/Invoice/Address/NaturalPersonInterface.php b/Api/Data/CheckoutForm/Invoice/Address/NaturalPersonInterface.php index cccd527..9447c7e 100644 --- a/Api/Data/CheckoutForm/Invoice/Address/NaturalPersonInterface.php +++ b/Api/Data/CheckoutForm/Invoice/Address/NaturalPersonInterface.php @@ -4,12 +4,31 @@ interface NaturalPersonInterface { - + /** + * @param string $firstName + * @return void + */ public function setFirstName(string $firstName); + + /** + * @param string $lastName + * @return void + */ public function setLastName(string $lastName); + /** + * @return string|null + */ public function getFirstName(): ?string; + + /** + * @return string|null + */ public function getLastName(): ?string; + /** + * @param array $rawData + * @return void + */ public function setRawData(array $rawData); } diff --git a/Api/Data/CheckoutForm/Invoice/AddressInterface.php b/Api/Data/CheckoutForm/Invoice/AddressInterface.php index fa0d3d5..67e8ac8 100644 --- a/Api/Data/CheckoutForm/Invoice/AddressInterface.php +++ b/Api/Data/CheckoutForm/Invoice/AddressInterface.php @@ -10,26 +10,81 @@ interface AddressInterface { - + /** + * @param string $zipCode + * @return void + */ public function setZipCode(string $zipCode); + + /** + * @param string $city + * @return void + */ public function setCity(string $city); + + /** + * @param string $city + * @return void + */ public function setStreet(string $city); + + /** + * @param string $countryCode + * @return void + */ public function setCountryCode(string $countryCode); + + /** + * @param CompanyInterface $company + * @return void + */ public function setCompany(CompanyInterface $company); + + /** + * @param NaturalPersonInterface $naturalPerson + * @return void + */ public function setNaturalPerson(NaturalPersonInterface $naturalPerson); + /** + * @return string|null + */ public function getZipCode(): ?string; + + /** + * @return string|null + */ public function getCity(): ?string; + + /** + * @return string|null + */ public function getStreet(): ?string; + + /** + * @return string|null + */ public function getCountryCode(): ?string; + + /** + * @return CompanyInterface + */ public function getCompany(): CompanyInterface; + + /** + * @return NaturalPersonInterface + */ public function getNaturalPerson(): NaturalPersonInterface; + /** + * @param array $rawData + * @return void + */ public function setRawData(array $rawData); /** - * @param QuoteAddressInterface|OrderAddressInterface $address + * @param OrderAddressInterface|QuoteAddressInterface $address * @param DeliveryAddressInterface $deliveryAddress */ - public function fillAddress($address, DeliveryAddressInterface $deliveryAddress); + public function fillAddress(OrderAddressInterface|QuoteAddressInterface $address, DeliveryAddressInterface $deliveryAddress); } diff --git a/Api/Data/CheckoutForm/InvoiceInterface.php b/Api/Data/CheckoutForm/InvoiceInterface.php index 2e93a9a..52a5ddd 100644 --- a/Api/Data/CheckoutForm/InvoiceInterface.php +++ b/Api/Data/CheckoutForm/InvoiceInterface.php @@ -6,7 +6,6 @@ interface InvoiceInterface { - /** * @param AddressInterface $address * @return void diff --git a/Api/Data/CheckoutForm/LineItemInterface.php b/Api/Data/CheckoutForm/LineItemInterface.php index fc0f0bd..f4a2504 100644 --- a/Api/Data/CheckoutForm/LineItemInterface.php +++ b/Api/Data/CheckoutForm/LineItemInterface.php @@ -4,16 +4,59 @@ interface LineItemInterface { + /** + * @param string $id + * @return void + */ public function setId(string $id); + + /** + * @param float $qty + * @return void + */ public function setQty(float $qty); + + /** + * @param AmountInterface $price + * @return void + */ public function setPrice(AmountInterface $price); + + /** + * @param string $offerId + * @return void + */ public function setOfferId(string $offerId); + + /** + * @param int $time + * @return void + */ public function setBoughtAt(int $time); + /** + * @return string|null + */ public function getId(): ?string; + + /** + * @return float|null + */ public function getQty(): ?float; + + /** + * @return AmountInterface + */ public function getPrice(): AmountInterface; + + /** + * @return string|null + */ public function getOfferId(): ?string; + + /** + * @return int + */ public function getBoughtAt(): int; /** diff --git a/Api/Data/CheckoutForm/PaymentInterface.php b/Api/Data/CheckoutForm/PaymentInterface.php index 8a1d072..48649be 100644 --- a/Api/Data/CheckoutForm/PaymentInterface.php +++ b/Api/Data/CheckoutForm/PaymentInterface.php @@ -4,7 +4,6 @@ interface PaymentInterface { - /** * @param string $type * @return void @@ -18,7 +17,7 @@ public function setType(string $type); public function setPaidAmount(AmountInterface $paidAmount); /** - * @return string + * @return string|null */ public function getType(): ?string; diff --git a/Api/Data/CheckoutForm/SummaryInterface.php b/Api/Data/CheckoutForm/SummaryInterface.php index 85778d8..af57467 100644 --- a/Api/Data/CheckoutForm/SummaryInterface.php +++ b/Api/Data/CheckoutForm/SummaryInterface.php @@ -4,7 +4,6 @@ interface SummaryInterface { - /** * @param AmountInterface $totalToPay * @return void diff --git a/Api/Data/CheckoutFormInterface.php b/Api/Data/CheckoutFormInterface.php index 5916b36..471cc9c 100644 --- a/Api/Data/CheckoutFormInterface.php +++ b/Api/Data/CheckoutFormInterface.php @@ -11,7 +11,6 @@ interface CheckoutFormInterface { - /** * @param string $id * @return void @@ -67,7 +66,7 @@ public function setSummary(SummaryInterface $summary); public function setMessageToSeller(string $messageToSeller); /** - * @return string + * @return string|null */ public function getId(): ?string; @@ -82,7 +81,7 @@ public function getBuyer(): BuyerInterface; public function getPayment(): PaymentInterface; /** - * @return string + * @return string|null */ public function getStatus(): ?string; @@ -107,7 +106,7 @@ public function getLineItems(): array; public function getSummary(): SummaryInterface; /** - * @return string + * @return string|null */ public function getMessageToSeller(): ?string; diff --git a/Api/Data/DeliveryMethodInterface.php b/Api/Data/DeliveryMethodInterface.php index 0b8d823..5fc9c7f 100644 --- a/Api/Data/DeliveryMethodInterface.php +++ b/Api/Data/DeliveryMethodInterface.php @@ -4,7 +4,6 @@ interface DeliveryMethodInterface { - /** * @param string $id * @return void @@ -24,17 +23,17 @@ public function setName(string $name); public function setPaymentPolicy(string $paymentPolicy); /** - * @return string + * @return string|null */ public function getId(): ?string; /** - * @return string + * @return string|null */ public function getName(): ?string; /** - * @return string + * @return string|null */ public function getPaymentPolicy(): ?string; diff --git a/Api/Data/EventInterface.php b/Api/Data/EventInterface.php index 19ea2b5..7d1077f 100644 --- a/Api/Data/EventInterface.php +++ b/Api/Data/EventInterface.php @@ -2,11 +2,8 @@ namespace Macopedia\Allegro\Api\Data; -use Macopedia\Allegro\Api\Data\Event\OrderInterface; - interface EventInterface { - const TYPE_BOUGHT = 'BOUGHT'; const TYPE_FILLED_IN = 'FILLED_IN'; const TYPE_READY_FOR_PROCESSING = 'READY_FOR_PROCESSING'; @@ -30,17 +27,17 @@ public function setType(string $type); public function setCheckoutFormId(string $checkoutFormId); /** - * @return string + * @return string|null */ public function getId(): ?string; /** - * @return string + * @return string|null */ public function getType(): ?string; /** - * @return string + * @return string|null */ public function getCheckoutFormId(): ?string; diff --git a/Api/Data/ImageInterface.php b/Api/Data/ImageInterface.php index a6391dc..ddc7911 100644 --- a/Api/Data/ImageInterface.php +++ b/Api/Data/ImageInterface.php @@ -4,7 +4,6 @@ interface ImageInterface { - const STATUS_LOCAL = 0; const STATUS_UPLOADED = 1; @@ -15,18 +14,18 @@ interface ImageInterface public function setUrl(string $url); /** - * @param int $stats + * @param int $status * @return void */ - public function setStatus(int $stats); + public function setStatus(int $status); /** - * @return string + * @return string|null */ public function getUrl(): ?string; /** - * @return string + * @return int|null */ public function getStatus(): ?int; diff --git a/Api/Data/ImpliedWarrantyInterface.php b/Api/Data/ImpliedWarrantyInterface.php index 92fbaa0..2d0a000 100644 --- a/Api/Data/ImpliedWarrantyInterface.php +++ b/Api/Data/ImpliedWarrantyInterface.php @@ -4,7 +4,6 @@ interface ImpliedWarrantyInterface { - /** * @param string $id * @return void diff --git a/Api/Data/Offer/AfterSalesServicesInterface.php b/Api/Data/Offer/AfterSalesServicesInterface.php index f129524..4ef7809 100644 --- a/Api/Data/Offer/AfterSalesServicesInterface.php +++ b/Api/Data/Offer/AfterSalesServicesInterface.php @@ -4,7 +4,6 @@ interface AfterSalesServicesInterface { - /** * @param string $impliedWarrantyId * @return void @@ -48,7 +47,7 @@ public function getWarrantyId(): ?string; public function setRawData(array $rawData); /** - * @return array + * @return array|null */ public function getRawData(): ?array; } diff --git a/Api/Data/Offer/LocationInterface.php b/Api/Data/Offer/LocationInterface.php index 25d2a17..726d8cf 100644 --- a/Api/Data/Offer/LocationInterface.php +++ b/Api/Data/Offer/LocationInterface.php @@ -4,7 +4,6 @@ interface LocationInterface { - /** * @param string $countryCode * @return void diff --git a/Api/Data/OfferInterface.php b/Api/Data/OfferInterface.php index ba1e9c1..8b17e41 100644 --- a/Api/Data/OfferInterface.php +++ b/Api/Data/OfferInterface.php @@ -7,7 +7,6 @@ interface OfferInterface { - const PUBLICATION_STATUS_ACTIVE = 'ACTIVE'; const PUBLICATION_STATUS_ACTIVATING = 'ACTIVATING'; const PUBLICATION_STATUS_INACTIVE = 'INACTIVE'; @@ -44,7 +43,7 @@ public function setDescription(string $description); public function setCategory(string $category); /** - * @param \Macopedia\Allegro\Api\Data\ParameterInterface[] $parameters + * @param ParameterInterface[] $parameters * @return void */ public function setParameters(array $parameters); @@ -62,7 +61,7 @@ public function setPrice(float $price); public function setQty(int $qty); /** - * @param \Macopedia\Allegro\Api\Data\ImageInterface[] $images + * @param ImageInterface[] $images * @return void */ public function setImages(array $images); @@ -105,7 +104,7 @@ public function setValidationErrors(array $validationErrors); /** * @param AfterSalesServicesInterface $afterSalesServices - * @return mixed + * @return void */ public function setAfterSalesServices(AfterSalesServicesInterface $afterSalesServices); @@ -155,7 +154,7 @@ public function getDescription(): ?string; public function getCategory(): ?string; /** - * @return \Macopedia\Allegro\Api\Data\ParameterInterface[] + * @return ParameterInterface[] */ public function getParameters(): ?array; @@ -170,7 +169,7 @@ public function getPrice(): ?float; public function getQty(): ?int; /** - * @return \Macopedia\Allegro\Api\Data\ImageInterface[] + * @return ImageInterface[] */ public function getImages(): ?array; diff --git a/Api/Data/Parameter/RangeInterface.php b/Api/Data/Parameter/RangeInterface.php index b79866a..7f303e5 100644 --- a/Api/Data/Parameter/RangeInterface.php +++ b/Api/Data/Parameter/RangeInterface.php @@ -6,7 +6,6 @@ interface RangeInterface extends ParameterInterface { - /** * @param string $minValue * @return void @@ -20,12 +19,12 @@ public function setMinValue(string $minValue); public function setMaxValue(string $maxValue); /** - * @return string + * @return string|null */ public function getMinValue(): ?string; /** - * @return string + * @return string|null */ public function getMaxValue(): ?string; } diff --git a/Api/Data/Parameter/ValuesIdsInterface.php b/Api/Data/Parameter/ValuesIdsInterface.php index 2ef3974..7c1063f 100644 --- a/Api/Data/Parameter/ValuesIdsInterface.php +++ b/Api/Data/Parameter/ValuesIdsInterface.php @@ -6,7 +6,6 @@ interface ValuesIdsInterface extends ParameterInterface { - /** * @param int[] $value * @return void diff --git a/Api/Data/Parameter/ValuesInterface.php b/Api/Data/Parameter/ValuesInterface.php index 28bff20..ce0d065 100644 --- a/Api/Data/Parameter/ValuesInterface.php +++ b/Api/Data/Parameter/ValuesInterface.php @@ -6,7 +6,6 @@ interface ValuesInterface extends ParameterInterface { - /** * @param string[] $value * @return void diff --git a/Api/Data/ParameterDefinition/DictionaryItemInterface.php b/Api/Data/ParameterDefinition/DictionaryItemInterface.php index e8dac0a..6975e71 100644 --- a/Api/Data/ParameterDefinition/DictionaryItemInterface.php +++ b/Api/Data/ParameterDefinition/DictionaryItemInterface.php @@ -4,7 +4,6 @@ interface DictionaryItemInterface { - /** * @param string $value * @return void @@ -18,12 +17,12 @@ public function setValue(string $value); public function setLabel(string $label); /** - * @return string + * @return string|null */ public function getValue(): ?string; /** - * @return string + * @return string|null */ public function getLabel(): ?string; diff --git a/Api/Data/ParameterDefinition/RestrictionInterface.php b/Api/Data/ParameterDefinition/RestrictionInterface.php index 627a3b1..fc5a9e0 100644 --- a/Api/Data/ParameterDefinition/RestrictionInterface.php +++ b/Api/Data/ParameterDefinition/RestrictionInterface.php @@ -4,7 +4,6 @@ interface RestrictionInterface { - /** * @param string $type * @return void @@ -15,15 +14,15 @@ public function setType(string $type); * @param mixed $value * @return void */ - public function setValue($value); + public function setValue(mixed $value); /** - * @return string + * @return string|null */ public function getType(): ?string; /** * @return mixed */ - public function getValue(); + public function getValue(): mixed; } diff --git a/Api/Data/ParameterDefinitionInterface.php b/Api/Data/ParameterDefinitionInterface.php index 5f4e4cd..c371f4a 100644 --- a/Api/Data/ParameterDefinitionInterface.php +++ b/Api/Data/ParameterDefinitionInterface.php @@ -2,6 +2,9 @@ namespace Macopedia\Allegro\Api\Data; +use Macopedia\Allegro\Api\Data\ParameterDefinition\DictionaryItemInterface; +use Macopedia\Allegro\Api\Data\ParameterDefinition\RestrictionInterface; + interface ParameterDefinitionInterface { const TYPE_INTEGER = 'integer'; @@ -26,7 +29,7 @@ public function setId(string $id); public function setName(string $label); /** - * @param string $unit + * @param string|null $unit * @return void */ public function setUnit(?string $unit); @@ -38,7 +41,7 @@ public function setUnit(?string $unit); public function setType(string $type); /** - * @param \Macopedia\Allegro\Api\Data\ParameterDefinition\DictionaryItemInterface[] $dictionary + * @param DictionaryItemInterface[] $dictionary * @return void */ public function setDictionary(array $dictionary); @@ -50,48 +53,48 @@ public function setDictionary(array $dictionary); public function setRequired(bool $required); /** - * @param \Macopedia\Allegro\Api\Data\ParameterDefinition\RestrictionInterface[] $restrictions + * @param RestrictionInterface[] $restrictions * @return void */ public function setRestrictions(array $restrictions); /** - * @return string + * @return string|null */ public function getId(): ?string; /** - * @return string + * @return string|null */ public function getName(): ?string; /** - * @return string + * @return string|null */ public function getType(): ?string; /** - * @return string + * @return string|null */ public function getUnit(): ?string; /** - * @return bool + * @return bool|null */ public function getRequired(): ?bool; /** - * @return \Macopedia\Allegro\Api\Data\ParameterDefinition\DictionaryItemInterface[] + * @return DictionaryItemInterface[] */ public function getDictionary(): array; /** - * @return string + * @return string|null */ public function getFrontendType(): ?string; /** - * @return \Macopedia\Allegro\Api\Data\ParameterDefinition\RestrictionInterface[] + * @return RestrictionInterface[] */ public function getRestrictions(): array; @@ -105,7 +108,7 @@ public function hasRestriction(string $type): bool; * @param string $type * @return mixed */ - public function getRestrictionValue(string $type); + public function getRestrictionValue(string $type): mixed; /** * @param array $rawData diff --git a/Api/Data/ParameterInterface.php b/Api/Data/ParameterInterface.php index 8683ad9..103dc4b 100644 --- a/Api/Data/ParameterInterface.php +++ b/Api/Data/ParameterInterface.php @@ -4,7 +4,6 @@ interface ParameterInterface { - /** * @param int $id * @return void @@ -12,7 +11,7 @@ interface ParameterInterface public function setId(int $id); /** - * @return int + * @return int|null */ public function getId(): ?int; diff --git a/Api/Data/ParameterInterfaceFactoryInterface.php b/Api/Data/ParameterInterfaceFactoryInterface.php index 90e26a9..6424075 100644 --- a/Api/Data/ParameterInterfaceFactoryInterface.php +++ b/Api/Data/ParameterInterfaceFactoryInterface.php @@ -18,11 +18,11 @@ interface ParameterInterfaceFactoryInterface * @param string $type * @return RangeInterface|ValuesIdsInterface|ValuesInterface */ - public function create(string $type): ParameterInterface; + public function create(string $type): RangeInterface|ValuesIdsInterface|ValuesInterface; /** * @param ParameterDefinitionInterface $parameterDefinition * @return RangeInterface|ValuesIdsInterface|ValuesInterface */ - public function createFromDefinition(ParameterDefinitionInterface $parameterDefinition): ParameterInterface; + public function createFromDefinition(ParameterDefinitionInterface $parameterDefinition): RangeInterface|ValuesIdsInterface|ValuesInterface; } diff --git a/Api/Data/PublicationCommandInterface.php b/Api/Data/PublicationCommandInterface.php index 310bf84..d1e8141 100644 --- a/Api/Data/PublicationCommandInterface.php +++ b/Api/Data/PublicationCommandInterface.php @@ -4,7 +4,6 @@ interface PublicationCommandInterface { - const ACTION_ACTIVATE = 'ACTIVATE'; const ACTION_END = 'END'; @@ -21,12 +20,12 @@ public function setOfferId(string $offerId); public function setAction(string $action); /** - * @return string + * @return string|null */ public function getAction(): ?string; /** - * @return string + * @return string|null */ public function getOfferId(): ?string; diff --git a/Api/Data/ReturnPolicyInterface.php b/Api/Data/ReturnPolicyInterface.php index 1b52c74..6a3e7e2 100644 --- a/Api/Data/ReturnPolicyInterface.php +++ b/Api/Data/ReturnPolicyInterface.php @@ -4,7 +4,6 @@ interface ReturnPolicyInterface { - /** * @param string $id * @return void diff --git a/Api/Data/Sales/Order/PickupPointExtensionAttributesInterface.php b/Api/Data/Sales/Order/PickupPointExtensionAttributesInterface.php index 574ca28..a8f6bdb 100644 --- a/Api/Data/Sales/Order/PickupPointExtensionAttributesInterface.php +++ b/Api/Data/Sales/Order/PickupPointExtensionAttributesInterface.php @@ -4,17 +4,69 @@ interface PickupPointExtensionAttributesInterface { - + /** + * @param string|null $pointId + * @return void + */ public function setPointId(?string $pointId); + + /** + * @param string|null $name + * @return void + */ public function setName(?string $name); + + /** + * @param string|null $description + * @return void + */ public function setDescription(?string $description); + + /** + * @param string|null $street + * @return void + */ public function setStreet(?string $street); + + /** + * @param string|null $zipCode + * @return void + */ public function setZipCode(?string $zipCode); + + /** + * @param string|null $city + * @return void + */ public function setCity(?string $city); + + /** + * @return string|null + */ public function getPointId(): ?string; + + /** + * @return string|null + */ public function getName(): ?string; + + /** + * @return string|null + */ public function getDescription(): ?string; + + /** + * @return string|null + */ public function getStreet(): ?string; + + /** + * @return string|null + */ public function getZipCode(): ?string; + + /** + * @return string|null + */ public function getCity(): ?string; } diff --git a/Api/Data/ShippingRateInterface.php b/Api/Data/ShippingRateInterface.php index 7264c73..640b31b 100644 --- a/Api/Data/ShippingRateInterface.php +++ b/Api/Data/ShippingRateInterface.php @@ -4,7 +4,6 @@ interface ShippingRateInterface { - /** * @param string $id * @return void diff --git a/Api/Data/TokenInterface.php b/Api/Data/TokenInterface.php index b270eeb..aa5f785 100644 --- a/Api/Data/TokenInterface.php +++ b/Api/Data/TokenInterface.php @@ -4,7 +4,6 @@ interface TokenInterface { - /** * @param string $accessToken * @return void diff --git a/Api/Data/WarrantyInterface.php b/Api/Data/WarrantyInterface.php index 5e99b98..f6a351f 100644 --- a/Api/Data/WarrantyInterface.php +++ b/Api/Data/WarrantyInterface.php @@ -4,7 +4,6 @@ interface WarrantyInterface { - /** * @param string $id * @return void diff --git a/Api/ProductRepositoryInterface.php b/Api/ProductRepositoryInterface.php index 49ac2a6..b00c3ca 100644 --- a/Api/ProductRepositoryInterface.php +++ b/Api/ProductRepositoryInterface.php @@ -11,7 +11,7 @@ interface ProductRepositoryInterface extends \Magento\Catalog\Api\ProductReposit /** * @param int $allegroOfferId * @param bool $editMode - * @param int $storeId + * @param int|null $storeId * @param bool $forceReload * @return ProductInterface * @throws NoSuchEntityException diff --git a/Api/ShippingRateRepositoryInterface.php b/Api/ShippingRateRepositoryInterface.php index 270066f..6ba369c 100644 --- a/Api/ShippingRateRepositoryInterface.php +++ b/Api/ShippingRateRepositoryInterface.php @@ -2,6 +2,8 @@ namespace Macopedia\Allegro\Api; +use Macopedia\Allegro\Api\Data\ShippingRateInterface; + interface ShippingRateRepositoryInterface { diff --git a/Model/Api/Auth/Data/Token.php b/Model/Api/Auth/Data/Token.php index bd5efdd..d140eb1 100644 --- a/Model/Api/Auth/Data/Token.php +++ b/Model/Api/Auth/Data/Token.php @@ -15,8 +15,7 @@ class Token extends DataObject implements TokenInterface const EXPIRATION_TIME_FIELD_NAME = 'expiration_time'; /** - * @param string $accessToken - * @return void + * {@inheritDoc} */ public function setAccessToken(string $accessToken) { @@ -24,8 +23,7 @@ public function setAccessToken(string $accessToken) } /** - * @param string $refreshToken - * @return void + * {@inheritDoc} */ public function setRefreshToken(string $refreshToken) { @@ -33,8 +31,7 @@ public function setRefreshToken(string $refreshToken) } /** - * @param int $expirationTime - * @return void + * {@inheritDoc} */ public function setExpirationTime(int $expirationTime) { @@ -42,7 +39,7 @@ public function setExpirationTime(int $expirationTime) } /** - * @return string + * {@inheritDoc} */ public function getAccessToken() { @@ -50,7 +47,7 @@ public function getAccessToken() } /** - * @return string + * {@inheritDoc} */ public function getRefreshToken() { @@ -58,7 +55,7 @@ public function getRefreshToken() } /** - * @return int + * {@inheritDoc} */ public function getExpirationTime() { @@ -66,8 +63,7 @@ public function getExpirationTime() } /** - * @return bool - * @throws \Exception + * {@inheritDoc} */ public function isExpired() { diff --git a/Model/CategoryRepository.php b/Model/CategoryRepository.php index 719c665..1af5a3a 100644 --- a/Model/CategoryRepository.php +++ b/Model/CategoryRepository.php @@ -5,7 +5,6 @@ use Macopedia\Allegro\Api\CategoryRepositoryInterface; use Macopedia\Allegro\Api\Data\CategoryInterface; use Macopedia\Allegro\Api\Data\CategoryInterfaceFactory; -use Macopedia\Allegro\Model\Api\ClientException; use Macopedia\Allegro\Model\ResourceModel\Sale\Categories; use Magento\Framework\Exception\NoSuchEntityException; use Macopedia\Allegro\Model\Api\ClientResponseException; @@ -24,15 +23,16 @@ class CategoryRepository implements CategoryRepositoryInterface * @param Categories $categories * @param CategoryInterfaceFactory $categoryFactory */ - public function __construct(Categories $categories, CategoryInterfaceFactory $categoryFactory) - { + public function __construct( + Categories $categories, + CategoryInterfaceFactory $categoryFactory + ) { $this->categories = $categories; $this->categoryFactory = $categoryFactory; } /** - * @return CategoryInterface[] - * @throws ClientException + * {@inheritDoc} */ public function getRootList(): array { @@ -55,9 +55,7 @@ public function getRootList(): array } /** - * @param string $parentCategoryId - * @return CategoryInterface[] - * @throws ClientException + * {@inheritDoc} */ public function getList(string $parentCategoryId): array { @@ -80,10 +78,7 @@ public function getList(string $parentCategoryId): array } /** - * @param string $categoryId - * @return CategoryInterface - * @throws ClientException - * @throws NoSuchEntityException + * {@inheritDoc} */ public function get(string $categoryId): CategoryInterface { @@ -102,10 +97,7 @@ public function get(string $categoryId): CategoryInterface } /** - * @param string $categoryId - * @return CategoryInterface[] - * @throws ClientException - * @throws NoSuchEntityException + * {@inheritDoc} */ public function getAllParents(string $categoryId): array { diff --git a/Model/CheckoutFormRepository.php b/Model/CheckoutFormRepository.php index 7d26210..2be3d78 100644 --- a/Model/CheckoutFormRepository.php +++ b/Model/CheckoutFormRepository.php @@ -3,7 +3,6 @@ namespace Macopedia\Allegro\Model; use Macopedia\Allegro\Api\CheckoutFormRepositoryInterface; -use Macopedia\Allegro\Model\Api\ClientException; use Macopedia\Allegro\Model\Api\ClientResponseException; use Macopedia\Allegro\Model\ResourceModel\Order\CheckoutForm; use Macopedia\Allegro\Api\Data\CheckoutFormInterface; @@ -31,10 +30,7 @@ public function __construct(CheckoutForm $checkoutForm, CheckoutFormInterfaceFac } /** - * @param string $checkoutFormId - * @return CheckoutFormInterface - * @throws ClientException - * @throws NoSuchEntityException + * {@inheritDoc} */ public function get(string $checkoutFormId): CheckoutFormInterface { diff --git a/Model/Consumer.php b/Model/Consumer.php index ebfead6..1a7238c 100644 --- a/Model/Consumer.php +++ b/Model/Consumer.php @@ -105,7 +105,7 @@ public function __construct( } /** - * @param MessageInterface $message + * {@inheritDoc} */ public function processMessage(MessageInterface $message) { diff --git a/Model/Data/Category.php b/Model/Data/Category.php index 5cd2919..9f21369 100644 --- a/Model/Data/Category.php +++ b/Model/Data/Category.php @@ -8,15 +8,13 @@ class Category extends DataObject implements CategoryInterface { - const ID_FIELD_NAME = 'id'; const NAME_FIELD_NAME = 'name'; const LEAF_FIELD_NAME = 'leaf'; const PARENT_FIELD_NAME = 'parent'; /** - * @param string $id - * @return void + * {@inheritDoc} */ public function setId(string $id) { @@ -24,8 +22,7 @@ public function setId(string $id) } /** - * @param string $name - * @return void + * {@inheritDoc} */ public function setName(string $name) { @@ -33,7 +30,7 @@ public function setName(string $name) } /** - * @param bool $leaf + * {@inheritDoc} */ public function setLeaf(bool $leaf) { @@ -41,7 +38,7 @@ public function setLeaf(bool $leaf) } /** - * @param string $parent + * {@inheritDoc} */ public function setParent(string $parent) { @@ -49,7 +46,7 @@ public function setParent(string $parent) } /** - * @return string + * {@inheritDoc} */ public function getId(): ?string { @@ -57,7 +54,7 @@ public function getId(): ?string } /** - * @return string + * {@inheritDoc} */ public function getName(): ?string { @@ -65,7 +62,7 @@ public function getName(): ?string } /** - * @return bool + * {@inheritDoc} */ public function getLeaf(): bool { @@ -73,7 +70,7 @@ public function getLeaf(): bool } /** - * @return string + * {@inheritDoc} */ public function getParent(): ?string { @@ -81,8 +78,7 @@ public function getParent(): ?string } /** - * @param array $rawData - * @return void + * {@inheritDoc} */ public function setRawData(array $rawData) { diff --git a/Model/Data/CheckoutForm.php b/Model/Data/CheckoutForm.php index 88524ed..eeaf62f 100644 --- a/Model/Data/CheckoutForm.php +++ b/Model/Data/CheckoutForm.php @@ -74,8 +74,7 @@ public function __construct( } /** - * @param string $id - * @return void + * {@inheritDoc} */ public function setId(string $id) { @@ -83,8 +82,7 @@ public function setId(string $id) } /** - * @param BuyerInterface $buyer - * @return void + * {@inheritDoc} */ public function setBuyer(BuyerInterface $buyer) { @@ -92,8 +90,7 @@ public function setBuyer(BuyerInterface $buyer) } /** - * @param PaymentInterface $payment - * @return void + * {@inheritDoc} */ public function setPayment(PaymentInterface $payment) { @@ -101,8 +98,7 @@ public function setPayment(PaymentInterface $payment) } /** - * @param string $status - * @return void + * {@inheritDoc} */ public function setStatus(string $status) { @@ -110,8 +106,7 @@ public function setStatus(string $status) } /** - * @param DeliveryInterface $delivery - * @return void + * {@inheritDoc} */ public function setDelivery(DeliveryInterface $delivery) { @@ -119,8 +114,7 @@ public function setDelivery(DeliveryInterface $delivery) } /** - * @param InvoiceInterface $invoice - * @return void + * {@inheritDoc} */ public function setInvoice(InvoiceInterface $invoice) { @@ -128,8 +122,7 @@ public function setInvoice(InvoiceInterface $invoice) } /** - * @param LineItemInterface[] - * @return void] $lineItems + * {@inheritDoc} */ public function setLineItems(array $lineItems) { @@ -137,8 +130,7 @@ public function setLineItems(array $lineItems) } /** - * @param SummaryInterface $summary - * @return void + * {@inheritDoc} */ public function setSummary(SummaryInterface $summary) { @@ -146,8 +138,7 @@ public function setSummary(SummaryInterface $summary) } /** - * @param string $messageToSeller - * @return void + * {@inheritDoc} */ public function setMessageToSeller(string $messageToSeller) { @@ -155,7 +146,7 @@ public function setMessageToSeller(string $messageToSeller) } /** - * @return string + * {@inheritDoc} */ public function getId(): ?string { @@ -163,7 +154,7 @@ public function getId(): ?string } /** - * @return BuyerInterface + * {@inheritDoc} */ public function getBuyer(): BuyerInterface { @@ -171,7 +162,7 @@ public function getBuyer(): BuyerInterface } /** - * @return PaymentInterface + * {@inheritDoc} */ public function getPayment(): PaymentInterface { @@ -179,7 +170,7 @@ public function getPayment(): PaymentInterface } /** - * @return string + * {@inheritDoc} */ public function getStatus(): ?string { @@ -187,7 +178,7 @@ public function getStatus(): ?string } /** - * @return DeliveryInterface + * {@inheritDoc} */ public function getDelivery(): DeliveryInterface { @@ -195,7 +186,7 @@ public function getDelivery(): DeliveryInterface } /** - * @return InvoiceInterface + * {@inheritDoc} */ public function getInvoice(): InvoiceInterface { @@ -203,7 +194,7 @@ public function getInvoice(): InvoiceInterface } /** - * @return LineItemInterface[] + * {@inheritDoc} */ public function getLineItems(): array { @@ -211,7 +202,7 @@ public function getLineItems(): array } /** - * @return SummaryInterface + * {@inheritDoc} */ public function getSummary(): SummaryInterface { @@ -219,7 +210,7 @@ public function getSummary(): SummaryInterface } /** - * @return string + * {@inheritDoc} */ public function getMessageToSeller(): ?string { @@ -227,7 +218,7 @@ public function getMessageToSeller(): ?string } /** - * @param array $rawData + * {@inheritDoc} */ public function setRawData(array $rawData) { diff --git a/Model/Data/CheckoutForm/Amount.php b/Model/Data/CheckoutForm/Amount.php index b6a534b..6793447 100644 --- a/Model/Data/CheckoutForm/Amount.php +++ b/Model/Data/CheckoutForm/Amount.php @@ -7,12 +7,10 @@ class Amount extends DataObject implements AmountInterface { - const AMOUNT_FIELD_NAME = 'amount'; /** - * @param float $amount - * @return void + * {@inheritDoc} */ public function setAmount(float $amount) { @@ -20,7 +18,7 @@ public function setAmount(float $amount) } /** - * @return float + * {@inheritDoc} */ public function getAmount(): ?float { @@ -28,7 +26,7 @@ public function getAmount(): ?float } /** - * @param array $rawData + * {@inheritDoc} */ public function setRawData(array $rawData) { diff --git a/Model/Data/CheckoutForm/Buyer.php b/Model/Data/CheckoutForm/Buyer.php index e526a0b..6d2342d 100644 --- a/Model/Data/CheckoutForm/Buyer.php +++ b/Model/Data/CheckoutForm/Buyer.php @@ -14,7 +14,7 @@ class Buyer extends DataObject implements BuyerInterface const LOGIN_FIELD_NAME = 'login'; /** - * @param string $firstName + * {@inheritDoc} */ public function setFirstName(string $firstName) { @@ -22,7 +22,7 @@ public function setFirstName(string $firstName) } /** - * @param string $lastName + * {@inheritDoc} */ public function setLastName(string $lastName) { @@ -30,7 +30,7 @@ public function setLastName(string $lastName) } /** - * @param string $email + * {@inheritDoc} */ public function setEmail(string $email) { @@ -38,7 +38,7 @@ public function setEmail(string $email) } /** - * @param string $login + * {@inheritDoc} */ public function setLogin(string $login) { @@ -46,7 +46,7 @@ public function setLogin(string $login) } /** - * @return string|null + * {@inheritDoc} */ public function getFirstName(): ?string { @@ -54,7 +54,7 @@ public function getFirstName(): ?string } /** - * @return string|null + * {@inheritDoc} */ public function getLastName(): ?string { @@ -62,7 +62,7 @@ public function getLastName(): ?string } /** - * @return string|null + * {@inheritDoc} */ public function getEmail(): ?string { @@ -70,7 +70,7 @@ public function getEmail(): ?string } /** - * @return string|null + * {@inheritDoc} */ public function getLogin(): ?string { @@ -78,7 +78,7 @@ public function getLogin(): ?string } /** - * @param array $rawData + * {@inheritDoc} */ public function setRawData(array $rawData) { diff --git a/Model/Data/CheckoutForm/Delivery.php b/Model/Data/CheckoutForm/Delivery.php index 5e2f53b..d0f327e 100644 --- a/Model/Data/CheckoutForm/Delivery.php +++ b/Model/Data/CheckoutForm/Delivery.php @@ -15,7 +15,6 @@ class Delivery extends DataObject implements DeliveryInterface { - const METHOD_FIELD_NAME = 'method'; const ADDRESS_FIELD_NAME = 'address'; const COST_FIELD_NAME = 'cost'; @@ -37,14 +36,18 @@ class Delivery extends DataObject implements DeliveryInterface * Delivery constructor. * @param MethodInterfaceFactory $methodFactory * @param AddressInterfaceFactory $addressFactory - * @param CostInterface $costFactory + * @param CostInterfaceFactory $costFactory + * @param PickupPointInterfaceFactory $pickupPointFactory + * @param array $data */ public function __construct( MethodInterfaceFactory $methodFactory, AddressInterfaceFactory $addressFactory, CostInterfaceFactory $costFactory, - PickupPointInterfaceFactory $pickupPointFactory + PickupPointInterfaceFactory $pickupPointFactory, + array $data = [] ) { + parent::__construct($data); $this->methodFactory = $methodFactory; $this->addressFactory = $addressFactory; $this->costFactory = $costFactory; @@ -52,8 +55,7 @@ public function __construct( } /** - * @param MethodInterface $method - * @return void + * {@inheritDoc} */ public function setMethod(MethodInterface $method) { @@ -61,8 +63,7 @@ public function setMethod(MethodInterface $method) } /** - * @param AddressInterface $address - * @return void + * {@inheritDoc} */ public function setAddress(AddressInterface $address) { @@ -70,7 +71,7 @@ public function setAddress(AddressInterface $address) } /** - * @param CostInterface $cost + * {@inheritDoc} */ public function setCost(CostInterface $cost) { @@ -78,7 +79,7 @@ public function setCost(CostInterface $cost) } /** - * @param PickupPointInterface $pickupPoint + * {@inheritDoc} */ public function setPickupPoint(PickupPointInterface $pickupPoint) { @@ -86,7 +87,7 @@ public function setPickupPoint(PickupPointInterface $pickupPoint) } /** - * @return MethodInterface + * {@inheritDoc} */ public function getMethod(): MethodInterface { @@ -94,7 +95,7 @@ public function getMethod(): MethodInterface } /** - * @return AddressInterface + * {@inheritDoc} */ public function getAddress(): AddressInterface { @@ -102,7 +103,7 @@ public function getAddress(): AddressInterface } /** - * @return CostInterface + * {@inheritDoc} */ public function getCost(): CostInterface { @@ -110,7 +111,7 @@ public function getCost(): CostInterface } /** - * @return PickupPointInterface + * {@inheritDoc} */ public function getPickupPoint(): PickupPointInterface { @@ -118,8 +119,7 @@ public function getPickupPoint(): PickupPointInterface } /** - * @param array $rawData - * @return void + * {@inheritDoc} */ public function setRawData(array $rawData) { @@ -143,7 +143,7 @@ private function mapMethodData(array $data): MethodInterface /** * @param array $data - * @return MethodInterface + * @return AddressInterface */ private function mapAddressData(array $data): AddressInterface { diff --git a/Model/Data/CheckoutForm/Delivery/Address.php b/Model/Data/CheckoutForm/Delivery/Address.php index ec01ae4..5978c88 100644 --- a/Model/Data/CheckoutForm/Delivery/Address.php +++ b/Model/Data/CheckoutForm/Delivery/Address.php @@ -10,7 +10,6 @@ class Address extends DataObject implements AddressInterface { - const FIRST_NAME_FIELD_NAME = 'first_name'; const LAST_NAME_FIELD_NAME = 'last_name'; const PHONE_NUMBER_FIELD_NAME = 'phone_number'; @@ -20,91 +19,138 @@ class Address extends DataObject implements AddressInterface const COUNTRY_CODE_FIELD_NAME = 'country_code'; const COMPANY_NAME_FIELD_NAME = 'company_name'; + /** + * {@inheritDoc} + */ public function setFirstName(string $firstName) { $this->setData(self::FIRST_NAME_FIELD_NAME, $firstName); } + /** + * {@inheritDoc} + */ public function setLastName(string $lastName) { $this->setData(self::LAST_NAME_FIELD_NAME, $lastName); } + /** + * {@inheritDoc} + */ public function setPhoneNumber(string $phoneNumber) { $this->setData(self::PHONE_NUMBER_FIELD_NAME, $phoneNumber); } + /** + * {@inheritDoc} + */ public function setZipCode(string $zipCode) { $this->setData(self::ZIP_CODE_FIELD_NAME, $zipCode); } + /** + * {@inheritDoc} + */ public function setCity(string $city) { $this->setData(self::CITY_FIELD_NAME, $city); } + /** + * {@inheritDoc} + */ public function setStreet(string $city) { $this->setData(self::STREET_FIELD_NAME, $city); } + /** + * {@inheritDoc} + */ public function setCountryCode(string $countryCode) { $this->setData(self::COUNTRY_CODE_FIELD_NAME, $countryCode); } + /** + * {@inheritDoc} + */ public function setCompanyName(string $companyName) { $this->setData(self::COMPANY_NAME_FIELD_NAME, $companyName); } + /** + * {@inheritDoc} + */ public function getFirstName(): ?string { return $this->getData(self::FIRST_NAME_FIELD_NAME); } + /** + * {@inheritDoc} + */ public function getLastName(): ?string { return $this->getData(self::LAST_NAME_FIELD_NAME); } + /** + * {@inheritDoc} + */ public function getPhoneNumber(): ?string { return $this->getData(self::PHONE_NUMBER_FIELD_NAME); } + /** + * {@inheritDoc} + */ public function getZipCode(): ?string { return $this->getData(self::ZIP_CODE_FIELD_NAME); } + /** + * {@inheritDoc} + */ public function getCity(): ?string { return $this->getData(self::CITY_FIELD_NAME); } + /** + * {@inheritDoc} + */ public function getStreet(): ?string { return $this->getData(self::STREET_FIELD_NAME); } + /** + * {@inheritDoc} + */ public function getCountryCode(): ?string { return $this->getData(self::COUNTRY_CODE_FIELD_NAME); } + /** + * {@inheritDoc} + */ public function getCompanyName(): ?string { return $this->getData(self::COMPANY_NAME_FIELD_NAME); } /** - * @param QuoteAddressInterface|OrderAddressInterface $address - * @return void + * {@inheritDoc} */ - public function fillAddress($address) + public function fillAddress(OrderAddressInterface|QuoteAddressInterface $address) { $address ->setFirstname($this->getFirstName() ?? 'unknown') @@ -118,8 +164,7 @@ public function fillAddress($address) } /** - * @param array $rawData - * @return void + * {@inheritDoc} */ public function setRawData(array $rawData) { diff --git a/Model/Data/CheckoutForm/Delivery/Cost.php b/Model/Data/CheckoutForm/Delivery/Cost.php index 85d3824..9618694 100644 --- a/Model/Data/CheckoutForm/Delivery/Cost.php +++ b/Model/Data/CheckoutForm/Delivery/Cost.php @@ -10,16 +10,25 @@ class Cost extends DataObject implements CostInterface const AMOUNT_FIELD_NAME = 'amount'; + /** + * {@inheritDoc} + */ public function setAmount(float $amount) { $this->setData(self::AMOUNT_FIELD_NAME, $amount); } + /** + * {@inheritDoc} + */ public function getAmount(): ?float { return $this->getData(self::AMOUNT_FIELD_NAME); } + /** + * {@inheritDoc} + */ public function setRawData(array $rawData) { if (isset($rawData['amount'])) { diff --git a/Model/Data/CheckoutForm/Delivery/Method.php b/Model/Data/CheckoutForm/Delivery/Method.php index bea1735..515ad28 100644 --- a/Model/Data/CheckoutForm/Delivery/Method.php +++ b/Model/Data/CheckoutForm/Delivery/Method.php @@ -7,12 +7,10 @@ class Method extends DataObject implements MethodInterface { - const ID_FIELD_NAME = 'id'; /** - * @param string $id - * @return void + * {@inheritDoc} */ public function setId(string $id) { @@ -20,7 +18,7 @@ public function setId(string $id) } /** - * @return string + * {@inheritDoc} */ public function getId(): ?string { @@ -28,8 +26,7 @@ public function getId(): ?string } /** - * @param array $rawData - * @return void + * {@inheritDoc} */ public function setRawData(array $rawData) { diff --git a/Model/Data/CheckoutForm/Delivery/PickupPoint.php b/Model/Data/CheckoutForm/Delivery/PickupPoint.php index f83e65d..28ed108 100644 --- a/Model/Data/CheckoutForm/Delivery/PickupPoint.php +++ b/Model/Data/CheckoutForm/Delivery/PickupPoint.php @@ -8,13 +8,11 @@ use Macopedia\Allegro\Api\Data\Sales\Order\PickupPointExtensionAttributesInterface; use Macopedia\Allegro\Api\Data\Sales\Order\PickupPointExtensionAttributesInterfaceFactory; use Magento\Framework\DataObject; -use Magento\Sales\Api\Data\OrderAddressExtensionInterface; use Magento\Sales\Api\Data\OrderExtensionFactory; use Magento\Sales\Api\Data\OrderInterface; class PickupPoint extends DataObject implements PickupPointInterface { - const ID_FIELD_NAME = 'id'; const NAME_FIELD_NAME = 'name'; const DESCRIPTION_FIELD_NAME = 'description'; @@ -32,19 +30,24 @@ class PickupPoint extends DataObject implements PickupPointInterface /** * PickupPoint constructor. * @param AddressInterfaceFactory $addressFactory + * @param OrderExtensionFactory $orderExtensionFactory + * @param PickupPointExtensionAttributesInterfaceFactory $pickupPointExtensionAttributesFactory + * @param array $data */ public function __construct( AddressInterfaceFactory $addressFactory, OrderExtensionFactory $orderExtensionFactory, - PickupPointExtensionAttributesInterfaceFactory $pickupPointExtensionAttributesFactory + PickupPointExtensionAttributesInterfaceFactory $pickupPointExtensionAttributesFactory, + array $data = [] ) { + parent::__construct($data); $this->addressFactory = $addressFactory; $this->orderExtensionFactory = $orderExtensionFactory; $this->pickupPointExtensionAttributesFactory = $pickupPointExtensionAttributesFactory; } /** - * @param string $id + * {@inheritDoc} */ public function setId(string $id) { @@ -52,7 +55,7 @@ public function setId(string $id) } /** - * @param string $name + * {@inheritDoc} */ public function setName(string $name) { @@ -60,7 +63,7 @@ public function setName(string $name) } /** - * @param string $description + * {@inheritDoc} */ public function setDescription(string $description) { @@ -68,7 +71,7 @@ public function setDescription(string $description) } /** - * @param AddressInterface $address + * {@inheritDoc} */ public function setAddress(AddressInterface $address) { @@ -76,7 +79,7 @@ public function setAddress(AddressInterface $address) } /** - * @return string|null + * {@inheritDoc} */ public function getId(): ?string { @@ -84,7 +87,7 @@ public function getId(): ?string } /** - * @return string|null + * {@inheritDoc} */ public function getName(): ?string { @@ -92,7 +95,7 @@ public function getName(): ?string } /** - * @return string|null + * {@inheritDoc} */ public function getDescription(): ?string { @@ -100,7 +103,7 @@ public function getDescription(): ?string } /** - * @return AddressInterface + * {@inheritDoc} */ public function getAddress(): AddressInterface { @@ -108,8 +111,7 @@ public function getAddress(): AddressInterface } /** - * @param OrderInterface $order - * @return void + * {@inheritDoc} */ public function fillOrder(OrderInterface $order) { @@ -140,7 +142,7 @@ public function fillOrder(OrderInterface $order) } /** - * @param array $rawData + * {@inheritDoc} */ public function setRawData(array $rawData) { diff --git a/Model/Data/CheckoutForm/Delivery/PickupPoint/Address.php b/Model/Data/CheckoutForm/Delivery/PickupPoint/Address.php index 7ded509..8ec3960 100644 --- a/Model/Data/CheckoutForm/Delivery/PickupPoint/Address.php +++ b/Model/Data/CheckoutForm/Delivery/PickupPoint/Address.php @@ -7,13 +7,12 @@ class Address extends DataObject implements AddressInterface { - const STREET_FIELD_NAME = 'street'; const ZIP_CODE_FIELD_NAME = 'zipcode'; const CITY_FIELD_NAME = 'city'; /** - * @param string $street + * {@inheritDoc} */ public function setStreet(string $street) { @@ -21,7 +20,7 @@ public function setStreet(string $street) } /** - * @param string $zipCode + * {@inheritDoc} */ public function setZipCode(string $zipCode) { @@ -29,7 +28,7 @@ public function setZipCode(string $zipCode) } /** - * @param string $city + * {@inheritDoc} */ public function setCity(string $city) { @@ -37,7 +36,7 @@ public function setCity(string $city) } /** - * @return string|null + * {@inheritDoc} */ public function getStreet(): ?string { @@ -45,7 +44,7 @@ public function getStreet(): ?string } /** - * @return string|null + * {@inheritDoc} */ public function getZipCode(): ?string { @@ -53,7 +52,7 @@ public function getZipCode(): ?string } /** - * @return string|null + * {@inheritDoc} */ public function getCity(): ?string { @@ -61,7 +60,7 @@ public function getCity(): ?string } /** - * @param array $rawData + * {@inheritDoc} */ public function setRawData(array $rawData) { diff --git a/Model/Data/CheckoutForm/Invoice.php b/Model/Data/CheckoutForm/Invoice.php index 1cc16f2..60a0450 100644 --- a/Model/Data/CheckoutForm/Invoice.php +++ b/Model/Data/CheckoutForm/Invoice.php @@ -10,7 +10,6 @@ class Invoice extends DataObject implements InvoiceInterface { - const ADDRESS_FIELD_NAME = 'address'; /** @var AddressInterfaceFactory */ @@ -19,15 +18,18 @@ class Invoice extends DataObject implements InvoiceInterface /** * Delivery constructor. * @param AddressInterfaceFactory $addressFactory + * @param array $data */ - public function __construct(AddressInterfaceFactory $addressFactory) - { + public function __construct( + AddressInterfaceFactory $addressFactory, + array $data = [] + ) { + parent::__construct($data); $this->addressFactory = $addressFactory; } /** - * @param AddressInterface $address - * @return void + * {@inheritDoc} */ public function setAddress(AddressInterface $address) { @@ -35,7 +37,7 @@ public function setAddress(AddressInterface $address) } /** - * @return AddressInterface + * {@inheritDoc} */ public function getAddress(): AddressInterface { @@ -43,8 +45,7 @@ public function getAddress(): AddressInterface } /** - * @param array $rawData - * @return void + * {@inheritDoc} */ public function setRawData(array $rawData) { @@ -53,7 +54,7 @@ public function setRawData(array $rawData) /** * @param array $data - * @return MethodInterface + * @return AddressInterface */ private function mapAddressData(array $data): AddressInterface { diff --git a/Model/Data/CheckoutForm/Invoice/Address.php b/Model/Data/CheckoutForm/Invoice/Address.php index b1da322..c299ab1 100644 --- a/Model/Data/CheckoutForm/Invoice/Address.php +++ b/Model/Data/CheckoutForm/Invoice/Address.php @@ -15,7 +15,6 @@ class Address extends DataObject implements AddressInterface { - const ZIP_CODE_FIELD_NAME = 'zip_code'; const CITY_FIELD_NAME = 'city'; const STREET_FIELD_NAME = 'street'; @@ -32,80 +31,119 @@ class Address extends DataObject implements AddressInterface /** * Address constructor. * @param CompanyInterfaceFactory $companyFactory + * @param NaturalPersonInterfaceFactory $naturalPersonFactory + * @param array $data */ public function __construct( CompanyInterfaceFactory $companyFactory, - NaturalPersonInterfaceFactory $naturalPersonFactory + NaturalPersonInterfaceFactory $naturalPersonFactory, + array $data = [] ) { + parent::__construct($data); $this->companyFactory = $companyFactory; $this->naturalPersonFactory = $naturalPersonFactory; } + /** + * {@inheritDoc} + */ public function setZipCode(string $zipCode) { $this->setData(self::ZIP_CODE_FIELD_NAME, $zipCode); } + /** + * {@inheritDoc} + */ public function setCity(string $city) { $this->setData(self::CITY_FIELD_NAME, $city); } + /** + * {@inheritDoc} + */ public function setStreet(string $city) { $this->setData(self::STREET_FIELD_NAME, $city); } + /** + * {@inheritDoc} + */ public function setCountryCode(string $countryCode) { $this->setData(self::COUNTRY_CODE_FIELD_NAME, $countryCode); } + /** + * {@inheritDoc} + */ public function setCompany(CompanyInterface $company) { $this->setData(self::COMPANY_FIELD_NAME, $company); } + /** + * {@inheritDoc} + */ public function setNaturalPerson(NaturalPersonInterface $naturalPerson) { $this->setData(self::NATURAL_PERSON_FIELD_NAME, $naturalPerson); } + /** + * {@inheritDoc} + */ public function getZipCode(): ?string { return $this->getData(self::ZIP_CODE_FIELD_NAME); } + /** + * {@inheritDoc} + */ public function getCity(): ?string { return $this->getData(self::CITY_FIELD_NAME); } + /** + * {@inheritDoc} + */ public function getStreet(): ?string { return $this->getData(self::STREET_FIELD_NAME); } + /** + * {@inheritDoc} + */ public function getCountryCode(): ?string { return $this->getData(self::COUNTRY_CODE_FIELD_NAME); } + /** + * {@inheritDoc} + */ public function getCompany(): CompanyInterface { return $this->getData(self::COMPANY_FIELD_NAME); } + /** + * {@inheritDoc} + */ public function getNaturalPerson(): NaturalPersonInterface { return $this->getData(self::NATURAL_PERSON_FIELD_NAME); } /** - * @param QuoteAddressInterface|OrderAddressInterface $address - * @param DeliveryAddressInterface $deliveryAddress + * {@inheritDoc} */ - public function fillAddress($address, DeliveryAddressInterface $deliveryAddress) + public function fillAddress(OrderAddressInterface|QuoteAddressInterface $address, DeliveryAddressInterface $deliveryAddress) { $address->setFirstname( $this->getNaturalPerson()->getFirstName() ?? $deliveryAddress->getFirstName() ?? 'unknown' @@ -136,6 +174,9 @@ public function fillAddress($address, DeliveryAddressInterface $deliveryAddress) ); } + /** + * {@inheritDoc} + */ public function setRawData(array $rawData) { if (isset($rawData['zipCode'])) { diff --git a/Model/Data/CheckoutForm/Invoice/Address/Company.php b/Model/Data/CheckoutForm/Invoice/Address/Company.php index f0538c2..b9b75f6 100644 --- a/Model/Data/CheckoutForm/Invoice/Address/Company.php +++ b/Model/Data/CheckoutForm/Invoice/Address/Company.php @@ -11,26 +11,41 @@ class Company extends DataObject implements CompanyInterface const NAME_FIELD_NAME = 'name'; const VAT_ID_FIELD_NAME = 'vat_id'; + /** + * {@inheritDoc} + */ public function setName(string $name) { $this->setData(self::NAME_FIELD_NAME, $name); } + /** + * {@inheritDoc} + */ public function setVatId(string $vatId) { $this->setData(self::VAT_ID_FIELD_NAME, $vatId); } + /** + * {@inheritDoc} + */ public function getName(): ?string { return $this->getData(self::NAME_FIELD_NAME); } + /** + * {@inheritDoc} + */ public function getVatId(): ?string { return $this->getData(self::VAT_ID_FIELD_NAME); } + /** + * {@inheritDoc} + */ public function setRawData(array $rawData) { if (isset($rawData['name'])) { diff --git a/Model/Data/CheckoutForm/Invoice/Address/NaturalPerson.php b/Model/Data/CheckoutForm/Invoice/Address/NaturalPerson.php index b7d4435..888205e 100644 --- a/Model/Data/CheckoutForm/Invoice/Address/NaturalPerson.php +++ b/Model/Data/CheckoutForm/Invoice/Address/NaturalPerson.php @@ -11,26 +11,41 @@ class NaturalPerson extends DataObject implements NaturalPersonInterface const FIRST_NAME_FIELD_NAME = 'first_name'; const LAST_NAME_FIELD_NAME = 'last_name'; + /** + * {@inheritDoc} + */ public function setFirstName(string $firstName) { $this->setData(self::FIRST_NAME_FIELD_NAME, $firstName); } + /** + * {@inheritDoc} + */ public function setLastName(string $lastName) { $this->setData(self::LAST_NAME_FIELD_NAME, $lastName); } + /** + * {@inheritDoc} + */ public function getFirstName(): ?string { return $this->getData(self::FIRST_NAME_FIELD_NAME); } + /** + * {@inheritDoc} + */ public function getLastName(): ?string { return $this->getData(self::LAST_NAME_FIELD_NAME); } + /** + * {@inheritDoc} + */ public function setRawData(array $rawData) { if (isset($rawData['firstName'])) { diff --git a/Model/Data/CheckoutForm/LineItem.php b/Model/Data/CheckoutForm/LineItem.php index 24a45ee..4ba8779 100644 --- a/Model/Data/CheckoutForm/LineItem.php +++ b/Model/Data/CheckoutForm/LineItem.php @@ -40,7 +40,7 @@ public function __construct( } /** - * @param string $id + * {@inheritDoc} */ public function setId(string $id) { @@ -48,7 +48,7 @@ public function setId(string $id) } /** - * @param float $qty + * {@inheritDoc} */ public function setQty(float $qty) { @@ -56,7 +56,7 @@ public function setQty(float $qty) } /** - * @param AmountInterface $price + * {@inheritDoc} */ public function setPrice(AmountInterface $price) { @@ -64,7 +64,7 @@ public function setPrice(AmountInterface $price) } /** - * @param string $offerId + * {@inheritDoc} */ public function setOfferId(string $offerId) { @@ -72,7 +72,7 @@ public function setOfferId(string $offerId) } /** - * @param int $time + * {@inheritDoc} */ public function setBoughtAt(int $time) { @@ -80,7 +80,7 @@ public function setBoughtAt(int $time) } /** - * @return string|null + * {@inheritDoc} */ public function getId(): ?string { @@ -88,7 +88,7 @@ public function getId(): ?string } /** - * @return float|null + * {@inheritDoc} */ public function getQty(): ?float { @@ -96,7 +96,7 @@ public function getQty(): ?float } /** - * @return AmountInterface + * {@inheritDoc} */ public function getPrice(): AmountInterface { @@ -104,7 +104,7 @@ public function getPrice(): AmountInterface } /** - * @return string|null + * {@inheritDoc} */ public function getOfferId(): ?string { @@ -112,7 +112,7 @@ public function getOfferId(): ?string } /** - * @return int + * {@inheritDoc} */ public function getBoughtAt(): int { @@ -120,7 +120,7 @@ public function getBoughtAt(): int } /** - * @param array $rawData + * {@inheritDoc} */ public function setRawData(array $rawData) { diff --git a/Model/Data/CheckoutForm/Payment.php b/Model/Data/CheckoutForm/Payment.php index 1472b7a..a2aa3d1 100644 --- a/Model/Data/CheckoutForm/Payment.php +++ b/Model/Data/CheckoutForm/Payment.php @@ -9,7 +9,6 @@ class Payment extends DataObject implements PaymentInterface { - const TYPE_FIELD_NAME = 'type'; const PAID_AMOUNT_FIELD_NAME = 'paid_amount'; @@ -19,15 +18,18 @@ class Payment extends DataObject implements PaymentInterface /** * Payment constructor. * @param AmountInterfaceFactory $amountFactory + * @param array $data */ - public function __construct(AmountInterfaceFactory $amountFactory) - { + public function __construct( + AmountInterfaceFactory $amountFactory, + array $data = [] + ) { + parent::__construct($data); $this->amountFactory = $amountFactory; } /** - * @param string $type - * @return void + * {@inheritDoc} */ public function setType(string $type) { @@ -35,8 +37,7 @@ public function setType(string $type) } /** - * @param AmountInterface $paidAmount - * @return void + * {@inheritDoc} */ public function setPaidAmount(AmountInterface $paidAmount) { @@ -44,7 +45,7 @@ public function setPaidAmount(AmountInterface $paidAmount) } /** - * @return string + * {@inheritDoc} */ public function getType(): ?string { @@ -52,7 +53,7 @@ public function getType(): ?string } /** - * @return AmountInterface + * {@inheritDoc} */ public function getPaidAmount(): AmountInterface { @@ -60,7 +61,7 @@ public function getPaidAmount(): AmountInterface } /** - * @param array $rawData + * {@inheritDoc} */ public function setRawData(array $rawData) { diff --git a/Model/Data/CheckoutForm/Summary.php b/Model/Data/CheckoutForm/Summary.php index 3afeab9..a3036e1 100644 --- a/Model/Data/CheckoutForm/Summary.php +++ b/Model/Data/CheckoutForm/Summary.php @@ -9,7 +9,6 @@ class Summary extends DataObject implements SummaryInterface { - const TOTAL_TO_PAY_FIELD_NAME = 'total_to_pay'; /** @var AmountInterfaceFactory */ @@ -18,14 +17,18 @@ class Summary extends DataObject implements SummaryInterface /** * Summary constructor. * @param AmountInterfaceFactory $amountFactory + * @param array $data */ - public function __construct(AmountInterfaceFactory $amountFactory) - { + public function __construct( + AmountInterfaceFactory $amountFactory, + array $data = [] + ) { + parent::__construct($data); $this->amountFactory = $amountFactory; } /** - * @param AmountInterface $totalToPay + * {@inheritDoc} */ public function setTotalToPay(AmountInterface $totalToPay) { @@ -33,7 +36,7 @@ public function setTotalToPay(AmountInterface $totalToPay) } /** - * @return AmountInterface + * {@inheritDoc} */ public function getTotalToPay(): AmountInterface { @@ -41,7 +44,7 @@ public function getTotalToPay(): AmountInterface } /** - * @param array $rawData + * {@inheritDoc} */ public function setRawData(array $rawData) { @@ -50,7 +53,7 @@ public function setRawData(array $rawData) /** * @param array $data - * @return AmountInterface|null + * @return AmountInterface */ private function mapAmountData(array $data): AmountInterface { diff --git a/Model/Data/DeliveryMethod.php b/Model/Data/DeliveryMethod.php index 01a23ba..4d7ee36 100644 --- a/Model/Data/DeliveryMethod.php +++ b/Model/Data/DeliveryMethod.php @@ -7,14 +7,12 @@ class DeliveryMethod extends DataObject implements DeliveryMethodInterface { - const ID_FIELD_NAME = 'id'; const NAME_FIELD_NAME = 'name'; const PAYMENT_POLICY_FIELD_NAME = 'payment_policy'; /** - * @param string $id - * @return void + * {@inheritDoc} */ public function setId(string $id) { @@ -22,8 +20,7 @@ public function setId(string $id) } /** - * @param string $name - * @return void + * {@inheritDoc} */ public function setName(string $name) { @@ -31,8 +28,7 @@ public function setName(string $name) } /** - * @param string $paymentPolicy - * @return void + * {@inheritDoc} */ public function setPaymentPolicy(string $paymentPolicy) { @@ -40,7 +36,7 @@ public function setPaymentPolicy(string $paymentPolicy) } /** - * @return string + * {@inheritDoc} */ public function getId(): ?string { @@ -48,7 +44,7 @@ public function getId(): ?string } /** - * @return string + * {@inheritDoc} */ public function getName(): ?string { @@ -56,7 +52,7 @@ public function getName(): ?string } /** - * @return string + * {@inheritDoc} */ public function getPaymentPolicy(): ?string { @@ -64,8 +60,7 @@ public function getPaymentPolicy(): ?string } /** - * @param array $rawData - * @return void + * {@inheritDoc} */ public function setRawData(array $rawData) { diff --git a/Model/Data/Event.php b/Model/Data/Event.php index 5ff6dbe..66d7fbd 100644 --- a/Model/Data/Event.php +++ b/Model/Data/Event.php @@ -13,16 +13,15 @@ class Event extends DataObject implements EventInterface const CHECKOUT_FORM_ID_FIELD_NAME = 'checkout_form_id'; /** - * @param string $id - * @return void + * {@inheritDoc} */ public function setId(string $id) { $this->setData(self::ID_FIELD_NAME, $id); } + /** - * @param string $type - * @return void + * {@inheritDoc} */ public function setType(string $type) { @@ -30,8 +29,7 @@ public function setType(string $type) } /** - * @param string $checkoutFormId - * @return void + * {@inheritDoc} */ public function setCheckoutFormId(string $checkoutFormId) { @@ -39,7 +37,7 @@ public function setCheckoutFormId(string $checkoutFormId) } /** - * @return string + * {@inheritDoc} */ public function getId(): string { @@ -47,7 +45,7 @@ public function getId(): string } /** - * @return string + * {@inheritDoc} */ public function getType(): string { @@ -55,7 +53,7 @@ public function getType(): string } /** - * @return string + * {@inheritDoc} */ public function getCheckoutFormId(): string { @@ -63,8 +61,7 @@ public function getCheckoutFormId(): string } /** - * @param array $rawData - * @return void + * {@inheritDoc} */ public function setRawData(array $rawData) { diff --git a/Model/Data/Image.php b/Model/Data/Image.php index e94dba9..66bdd95 100644 --- a/Model/Data/Image.php +++ b/Model/Data/Image.php @@ -12,8 +12,7 @@ class Image extends DataObject implements ImageInterface const STATUS_FIELD_NAME = 'status'; /** - * @param string $url - * @return void + * {@inheritDoc} */ public function setUrl(string $url) { @@ -21,8 +20,7 @@ public function setUrl(string $url) } /** - * @param int $status - * @return void + * {@inheritDoc} */ public function setStatus(int $status) { @@ -30,7 +28,7 @@ public function setStatus(int $status) } /** - * @return string + * {@inheritDoc} */ public function getUrl(): ?string { @@ -38,7 +36,7 @@ public function getUrl(): ?string } /** - * @return string + * {@inheritDoc} */ public function getStatus(): ?int { @@ -46,8 +44,7 @@ public function getStatus(): ?int } /** - * @param array $rawData - * @return void + * {@inheritDoc} */ public function setRawData(array $rawData) { @@ -56,7 +53,7 @@ public function setRawData(array $rawData) } /** - * @return array + * {@inheritDoc} */ public function getRawData(): array { @@ -75,7 +72,7 @@ public function getPath() * @param string $path * @return Image */ - public function setPath($path) + public function setPath(string $path) { return $this->setData(self::PATH, $path); } diff --git a/Model/Data/ImpliedWarranty.php b/Model/Data/ImpliedWarranty.php index 40f43a2..26a02c9 100644 --- a/Model/Data/ImpliedWarranty.php +++ b/Model/Data/ImpliedWarranty.php @@ -11,8 +11,7 @@ class ImpliedWarranty extends DataObject implements ImpliedWarrantyInterface const NAME_FIELD_NAME = 'name'; /** - * @param string $id - * @return void + * {@inheritDoc} */ public function setId(string $id) { @@ -20,8 +19,7 @@ public function setId(string $id) } /** - * @param string $name - * @return void + * {@inheritDoc} */ public function setName(string $name) { @@ -29,7 +27,7 @@ public function setName(string $name) } /** - * @return string + * {@inheritDoc} */ public function getId(): ?string { @@ -37,7 +35,7 @@ public function getId(): ?string } /** - * @return string + * {@inheritDoc} */ public function getName(): ?string { @@ -45,8 +43,7 @@ public function getName(): ?string } /** - * @param array $rawData - * @return void + * {@inheritDoc} */ public function setRawData(array $rawData) { diff --git a/Model/Data/Offer.php b/Model/Data/Offer.php index 8d8b144..c9e5a7e 100644 --- a/Model/Data/Offer.php +++ b/Model/Data/Offer.php @@ -15,7 +15,6 @@ class Offer extends DataObject implements OfferInterface { - const ID_FIELD_NAME = 'id'; const EAN_FIELD_NAME = 'ean'; const NAME_FIELD_NAME = 'name'; @@ -51,7 +50,6 @@ class Offer extends DataObject implements OfferInterface * @param ImageInterfaceFactory $imageFactory * @param LocationInterfaceFactory $locationFactory * @param AfterSalesServicesInterfaceFactory $afterSalesServicesFactory - * @throws \Macopedia\Allegro\Model\Api\ClientException */ public function __construct( ParameterDefinitionRepositoryInterface $parameterDefinitionRepository, @@ -67,8 +65,7 @@ public function __construct( } /** - * @param string $id - * @return void + * {@inheritDoc} */ public function setId(string $id) { @@ -76,7 +73,7 @@ public function setId(string $id) } /** - * @param string $ean + * {@inheritDoc} */ public function setEan(string $ean) { @@ -84,8 +81,7 @@ public function setEan(string $ean) } /** - * @param string $name - * @return void + * {@inheritDoc} */ public function setName(string $name) { @@ -93,8 +89,7 @@ public function setName(string $name) } /** - * @param string $description - * @return void + * {@inheritDoc} */ public function setDescription(string $description) { @@ -102,8 +97,7 @@ public function setDescription(string $description) } /** - * @param string $category - * @return void + * {@inheritDoc} */ public function setCategory(string $category) { @@ -111,8 +105,7 @@ public function setCategory(string $category) } /** - * @param int $qty - * @return void + * {@inheritDoc} */ public function setQty(int $qty) { @@ -120,8 +113,7 @@ public function setQty(int $qty) } /** - * @param float $price - * @return void + * {@inheritDoc} */ public function setPrice(float $price) { @@ -129,8 +121,7 @@ public function setPrice(float $price) } /** - * @param ParameterInterface[] $parameters - * @return void + * {@inheritDoc} */ public function setParameters(array $parameters) { @@ -138,8 +129,7 @@ public function setParameters(array $parameters) } /** - * @param ImageInterface[] $images - * @return void + * {@inheritDoc} */ public function setImages(array $images) { @@ -147,7 +137,7 @@ public function setImages(array $images) } /** - * @param LocationInterface $location + * {@inheritDoc} */ public function setLocation(LocationInterface $location) { @@ -155,7 +145,7 @@ public function setLocation(LocationInterface $location) } /** - * @param string $deliveryShippingRate + * {@inheritDoc} */ public function setDeliveryShippingRatesId(string $deliveryShippingRate) { @@ -163,7 +153,7 @@ public function setDeliveryShippingRatesId(string $deliveryShippingRate) } /** - * @param string $handlingTime + * {@inheritDoc} */ public function setDeliveryHandlingTime(string $handlingTime) { @@ -171,7 +161,7 @@ public function setDeliveryHandlingTime(string $handlingTime) } /** - * @param string $paymentsInvoice + * {@inheritDoc} */ public function setPaymentsInvoice(string $paymentsInvoice) { @@ -179,7 +169,7 @@ public function setPaymentsInvoice(string $paymentsInvoice) } /** - * @param string $publicationStatus + * {@inheritDoc} */ public function setPublicationStatus(string $publicationStatus) { @@ -187,7 +177,7 @@ public function setPublicationStatus(string $publicationStatus) } /** - * @param string[] $validationErrors + * {@inheritDoc} */ public function setValidationErrors(array $validationErrors) { @@ -195,8 +185,7 @@ public function setValidationErrors(array $validationErrors) } /** - * @param AfterSalesServicesInterface $afterSalesServices - * @return void + * {@inheritDoc} */ public function setAfterSalesServices(AfterSalesServicesInterface $afterSalesServices) { @@ -204,7 +193,7 @@ public function setAfterSalesServices(AfterSalesServicesInterface $afterSalesSer } /** - * @return string + * {@inheritDoc} */ public function getId(): ?string { @@ -212,7 +201,7 @@ public function getId(): ?string } /** - * @return string|null + * {@inheritDoc} */ public function getEan(): ?string { @@ -220,7 +209,7 @@ public function getEan(): ?string } /** - * @return string + * {@inheritDoc} */ public function getName(): ?string { @@ -228,7 +217,7 @@ public function getName(): ?string } /** - * @return string + * {@inheritDoc} */ public function getDescription(): ?string { @@ -236,7 +225,7 @@ public function getDescription(): ?string } /** - * @return string + * {@inheritDoc} */ public function getCategory(): ?string { @@ -244,7 +233,7 @@ public function getCategory(): ?string } /** - * @return int + * {@inheritDoc} */ public function getQty(): ?int { @@ -252,7 +241,7 @@ public function getQty(): ?int } /** - * @return float + * {@inheritDoc} */ public function getPrice(): ?float { @@ -260,7 +249,7 @@ public function getPrice(): ?float } /** - * @return ParameterInterface[] + * {@inheritDoc} */ public function getParameters(): array { @@ -268,7 +257,7 @@ public function getParameters(): array } /** - * @return ImageInterface[] + * {@inheritDoc} */ public function getImages(): array { @@ -276,7 +265,7 @@ public function getImages(): array } /** - * @return LocationInterface + * {@inheritDoc} */ public function getLocation(): LocationInterface { @@ -284,7 +273,7 @@ public function getLocation(): LocationInterface } /** - * @return string|null + * {@inheritDoc} */ public function getDeliveryShippingRatesId(): ?string { @@ -292,7 +281,7 @@ public function getDeliveryShippingRatesId(): ?string } /** - * @return string|null + * {@inheritDoc} */ public function getDeliveryHandlingTime(): ?string { @@ -300,7 +289,7 @@ public function getDeliveryHandlingTime(): ?string } /** - * @return string|null + * {@inheritDoc} */ public function getPaymentsInvoice(): ?string { @@ -308,7 +297,7 @@ public function getPaymentsInvoice(): ?string } /** - * @return string|null + * {@inheritDoc} */ public function getPublicationStatus(): ?string { @@ -316,7 +305,7 @@ public function getPublicationStatus(): ?string } /** - * @return string[] + * {@inheritDoc} */ public function getValidationErrors(): array { @@ -324,7 +313,7 @@ public function getValidationErrors(): array } /** - * @return AfterSalesServicesInterface + * {@inheritDoc} */ public function getAfterSalesServices(): AfterSalesServicesInterface { @@ -332,7 +321,7 @@ public function getAfterSalesServices(): AfterSalesServicesInterface } /** - * @return bool + * {@inheritDoc} */ public function canBePublished(): bool { @@ -346,7 +335,7 @@ public function canBePublished(): bool } /** - * @return bool + * {@inheritDoc} */ public function canBeEnded(): bool { @@ -354,7 +343,7 @@ public function canBeEnded(): bool } /** - * @return bool + * {@inheritDoc} */ public function isDraft(): bool { @@ -362,7 +351,7 @@ public function isDraft(): bool } /** - * @return bool + * {@inheritDoc} */ public function isValid(): bool { @@ -370,8 +359,7 @@ public function isValid(): bool } /** - * @param array $rawData - * @throws \Macopedia\Allegro\Model\Api\ClientException + * {@inheritDoc} */ public function setRawData(array $rawData) { @@ -417,7 +405,7 @@ public function setRawData(array $rawData) } /** - * @return array + * {@inheritDoc} */ public function getRawData(): array { diff --git a/Model/Data/Offer/AfterSalesServices.php b/Model/Data/Offer/AfterSalesServices.php index 7a9a3ca..8fe36d3 100644 --- a/Model/Data/Offer/AfterSalesServices.php +++ b/Model/Data/Offer/AfterSalesServices.php @@ -13,7 +13,7 @@ class AfterSalesServices extends DataObject implements AfterSalesServicesInterfa const WARRANTY_ID_FIELD_NAME = 'warranty_id'; /** - * @param string $impliedWarrantyId + * {@inheritDoc} */ public function setImpliedWarrantyId(string $impliedWarrantyId) { @@ -21,7 +21,7 @@ public function setImpliedWarrantyId(string $impliedWarrantyId) } /** - * @param string $returnPolicy + * {@inheritDoc} */ public function setReturnPolicyId(string $returnPolicy) { @@ -29,7 +29,7 @@ public function setReturnPolicyId(string $returnPolicy) } /** - * @param string $warrantyId + * {@inheritDoc} */ public function setWarrantyId(string $warrantyId) { @@ -37,7 +37,7 @@ public function setWarrantyId(string $warrantyId) } /** - * @return string|null + * {@inheritDoc} */ public function getImpliedWarrantyId(): ?string { @@ -45,7 +45,7 @@ public function getImpliedWarrantyId(): ?string } /** - * @return string|null + * {@inheritDoc} */ public function getReturnPolicyId(): ?string { @@ -53,7 +53,7 @@ public function getReturnPolicyId(): ?string } /** - * @return string|null + * {@inheritDoc} */ public function getWarrantyId(): ?string { @@ -61,7 +61,7 @@ public function getWarrantyId(): ?string } /** - * @param array $rawData + * {@inheritDoc} */ public function setRawData(array $rawData) { @@ -77,7 +77,7 @@ public function setRawData(array $rawData) } /** - * @return array + * {@inheritDoc} */ public function getRawData(): ?array { diff --git a/Model/Data/Offer/Location.php b/Model/Data/Offer/Location.php index 1e30b3a..9831c44 100644 --- a/Model/Data/Offer/Location.php +++ b/Model/Data/Offer/Location.php @@ -7,14 +7,13 @@ class Location extends DataObject implements LocationInterface { - const COUNTRY_CODE_FIELD_NAME = 'country_code'; const PROVINCE_FIELD_NAME = 'province'; const CITY_FIELD_NAME = 'city'; const POST_CODE_FIELD_NAME = 'post_code'; /** - * @param string $countryCode + * {@inheritDoc} */ public function setCountryCode(string $countryCode) { @@ -22,7 +21,7 @@ public function setCountryCode(string $countryCode) } /** - * @param string $province + * {@inheritDoc} */ public function setProvince(string $province) { @@ -30,7 +29,7 @@ public function setProvince(string $province) } /** - * @param string $city + * {@inheritDoc} */ public function setCity(string $city) { @@ -38,7 +37,7 @@ public function setCity(string $city) } /** - * @param string $postCode + * {@inheritDoc} */ public function setPostCode(string $postCode) { @@ -46,7 +45,7 @@ public function setPostCode(string $postCode) } /** - * @return string|null + * {@inheritDoc} */ public function getCountryCode(): ?string { @@ -54,7 +53,7 @@ public function getCountryCode(): ?string } /** - * @return string|null + * {@inheritDoc} */ public function getProvince(): ?string { @@ -62,7 +61,7 @@ public function getProvince(): ?string } /** - * @return string|null + * {@inheritDoc} */ public function getCity(): ?string { @@ -70,7 +69,7 @@ public function getCity(): ?string } /** - * @return string|null + * {@inheritDoc} */ public function getPostCode(): ?string { @@ -78,7 +77,7 @@ public function getPostCode(): ?string } /** - * @param array $rawData + * {@inheritDoc} */ public function setRawData(array $rawData) { @@ -97,7 +96,7 @@ public function setRawData(array $rawData) } /** - * @return array + * {@inheritDoc} */ public function getRawData(): array { diff --git a/Model/Data/Parameter.php b/Model/Data/Parameter.php index 3b259b0..9fce9bb 100644 --- a/Model/Data/Parameter.php +++ b/Model/Data/Parameter.php @@ -12,8 +12,7 @@ abstract class Parameter extends DataObject implements ParameterInterface const ID_FIELD_NAME = 'id'; /** - * @param int $id - * @return void + * {@inheritDoc} */ public function setId(int $id) { @@ -21,7 +20,7 @@ public function setId(int $id) } /** - * @return int + * {@inheritDoc} */ public function getId(): ?int { @@ -29,7 +28,7 @@ public function getId(): ?int } /** - * @param array $rawData + * {@inheritDoc} */ public function setRawData(array $rawData) { diff --git a/Model/Data/Parameter/Range.php b/Model/Data/Parameter/Range.php index 70c3945..cf9cb52 100644 --- a/Model/Data/Parameter/Range.php +++ b/Model/Data/Parameter/Range.php @@ -7,13 +7,11 @@ class Range extends Parameter implements RangeInterface { - const MIN_VALUE_FIELD_NAME = 'min_value'; const MAX_VALUE_FIELD_NAME = 'max_value'; /** - * @param string $minValue - * @return void + * {@inheritDoc} */ public function setMinValue(string $minValue) { @@ -21,8 +19,7 @@ public function setMinValue(string $minValue) } /** - * @param string $maxValue - * @return void + * {@inheritDoc} */ public function setMaxValue(string $maxValue) { @@ -30,7 +27,7 @@ public function setMaxValue(string $maxValue) } /** - * @return string + * {@inheritDoc} */ public function getMinValue(): ?string { @@ -38,7 +35,7 @@ public function getMinValue(): ?string } /** - * @return string + * {@inheritDoc} */ public function getMaxValue(): ?string { @@ -46,7 +43,7 @@ public function getMaxValue(): ?string } /** - * @return bool + * {@inheritDoc} */ public function isValueEmpty(): bool { @@ -55,7 +52,7 @@ public function isValueEmpty(): bool } /** - * @param array $rawData + * {@inheritDoc} */ public function setRawData(array $rawData) { @@ -69,7 +66,7 @@ public function setRawData(array $rawData) } /** - * @return array + * {@inheritDoc} */ public function getRawData(): array { diff --git a/Model/Data/Parameter/Values.php b/Model/Data/Parameter/Values.php index 50990fa..c16e51a 100644 --- a/Model/Data/Parameter/Values.php +++ b/Model/Data/Parameter/Values.php @@ -7,12 +7,10 @@ class Values extends Parameter implements ValuesInterface { - const VALUE_FIELD_NAME = 'value'; /** - * @param string[] $value - * @return void + * {@inheritDoc} */ public function setValue(array $value) { @@ -20,7 +18,7 @@ public function setValue(array $value) } /** - * @return string[] + * {@inheritDoc} */ public function getValue(): array { @@ -28,7 +26,7 @@ public function getValue(): array } /** - * @param array $rawData + * {@inheritDoc} */ public function setRawData(array $rawData) { @@ -37,7 +35,7 @@ public function setRawData(array $rawData) } /** - * @return bool + * {@inheritDoc} */ public function isValueEmpty(): bool { @@ -45,7 +43,7 @@ public function isValueEmpty(): bool } /** - * @return array + * {@inheritDoc} */ public function getRawData(): array { diff --git a/Model/Data/Parameter/ValuesIds.php b/Model/Data/Parameter/ValuesIds.php index d5b4b9a..16aae61 100644 --- a/Model/Data/Parameter/ValuesIds.php +++ b/Model/Data/Parameter/ValuesIds.php @@ -7,12 +7,10 @@ class ValuesIds extends Parameter implements ValuesIdsInterface { - const VALUE_FIELD_NAME = 'value'; /** - * @param int[] $value - * @return void + * {@inheritDoc} */ public function setValue(array $value) { @@ -20,7 +18,7 @@ public function setValue(array $value) } /** - * @return int[] + * {@inheritDoc} */ public function getValue(): array { @@ -28,7 +26,7 @@ public function getValue(): array } /** - * @return bool + * {@inheritDoc} */ public function isValueEmpty(): bool { @@ -36,7 +34,7 @@ public function isValueEmpty(): bool } /** - * @param array $rawData + * {@inheritDoc} */ public function setRawData(array $rawData) { @@ -45,7 +43,7 @@ public function setRawData(array $rawData) } /** - * @return array + * {@inheritDoc} */ public function getRawData(): array { diff --git a/Model/Data/ParameterDefinition.php b/Model/Data/ParameterDefinition.php index 48b1f2e..41f73fd 100644 --- a/Model/Data/ParameterDefinition.php +++ b/Model/Data/ParameterDefinition.php @@ -31,6 +31,7 @@ class ParameterDefinition extends DataObject implements ParameterDefinitionInter /** * ParameterDefinition constructor. * @param DictionaryItemInterfaceFactory $dictionaryItemFactory + * @param RestrictionInterfaceFactory $restrictionFactory */ public function __construct( DictionaryItemInterfaceFactory $dictionaryItemFactory, @@ -41,8 +42,7 @@ public function __construct( } /** - * @param string $id - * @return void + * {@inheritDoc} */ public function setId(string $id) { @@ -50,8 +50,7 @@ public function setId(string $id) } /** - * @param string $label - * @return void + * {@inheritDoc} */ public function setName(string $label) { @@ -59,8 +58,7 @@ public function setName(string $label) } /** - * @param string $type - * @return void + * {@inheritDoc} */ public function setType(string $type) { @@ -68,8 +66,7 @@ public function setType(string $type) } /** - * @param string $type - * @return void + * {@inheritDoc} */ public function setUnit(?string $type) { @@ -77,8 +74,7 @@ public function setUnit(?string $type) } /** - * @param bool $required - * @return void + * {@inheritDoc} */ public function setRequired(bool $required) { @@ -86,8 +82,7 @@ public function setRequired(bool $required) } /** - * @param \Macopedia\Allegro\Api\Data\ParameterDefinition\DictionaryItemInterface[] $dictionary - * @return void + * {@inheritDoc} */ public function setDictionary(array $dictionary) { @@ -95,8 +90,7 @@ public function setDictionary(array $dictionary) } /** - * @param \Macopedia\Allegro\Api\Data\ParameterDefinition\RestrictionInterface[] $restrictions - * @return void + * {@inheritDoc} */ public function setRestrictions(array $restrictions) { @@ -104,7 +98,7 @@ public function setRestrictions(array $restrictions) } /** - * @return string + * {@inheritDoc} */ public function getId(): ?string { @@ -112,7 +106,7 @@ public function getId(): ?string } /** - * @return string + * {@inheritDoc} */ public function getName(): ?string { @@ -120,7 +114,7 @@ public function getName(): ?string } /** - * @return string + * {@inheritDoc} */ public function getType(): ?string { @@ -128,7 +122,7 @@ public function getType(): ?string } /** - * @return string + * {@inheritDoc} */ public function getUnit(): ?string { @@ -136,7 +130,7 @@ public function getUnit(): ?string } /** - * @return bool + * {@inheritDoc} */ public function getRequired(): bool { @@ -144,7 +138,7 @@ public function getRequired(): bool } /** - * @return \Macopedia\Allegro\Api\Data\ParameterDefinition\DictionaryItemInterface[] + * {@inheritDoc} */ public function getDictionary(): array { @@ -152,7 +146,7 @@ public function getDictionary(): array } /** - * @return \Macopedia\Allegro\Api\Data\ParameterDefinition\RestrictionInterface[] + * {@inheritDoc} */ public function getRestrictions(): array { @@ -160,8 +154,7 @@ public function getRestrictions(): array } /** - * @param string $type - * @return bool + * {@inheritDoc} */ public function hasRestriction(string $type): bool { @@ -174,10 +167,9 @@ public function hasRestriction(string $type): bool } /** - * @param string $type - * @return mixed + * {@inheritDoc} */ - public function getRestrictionValue(string $type) + public function getRestrictionValue(string $type): mixed { foreach ($this->getRestrictions() as $restriction) { if ($restriction->getType() == $type) { @@ -188,7 +180,7 @@ public function getRestrictionValue(string $type) } /** - * @return string + * {@inheritDoc} */ public function getFrontendType(): string { @@ -204,7 +196,7 @@ public function getFrontendType(): string } /** - * @param array $rawData + * {@inheritDoc} */ public function setRawData(array $rawData) { diff --git a/Model/Data/ParameterDefinition/DictionaryItem.php b/Model/Data/ParameterDefinition/DictionaryItem.php index 27845d1..1f6e279 100644 --- a/Model/Data/ParameterDefinition/DictionaryItem.php +++ b/Model/Data/ParameterDefinition/DictionaryItem.php @@ -8,12 +8,11 @@ class DictionaryItem extends DataObject implements DictionaryItemInterface { - const VALUE_FIELD_NAME = 'value'; const LABEL_FIELD_NAME = 'label'; /** - * @param string $value + * {@inheritDoc} */ public function setValue(string $value) { @@ -21,7 +20,7 @@ public function setValue(string $value) } /** - * @param string $label + * {@inheritDoc} */ public function setLabel(string $label) { @@ -29,7 +28,7 @@ public function setLabel(string $label) } /** - * @return string + * {@inheritDoc} */ public function getValue(): ?string { @@ -37,7 +36,7 @@ public function getValue(): ?string } /** - * @return string + * {@inheritDoc} */ public function getLabel(): ?string { @@ -45,8 +44,7 @@ public function getLabel(): ?string } /** - * @param array $rawData - * @return void + * {@inheritDoc} */ public function setRawData(array $rawData) { diff --git a/Model/Data/ParameterDefinition/Restriction.php b/Model/Data/ParameterDefinition/Restriction.php index 5467f43..fe8df34 100644 --- a/Model/Data/ParameterDefinition/Restriction.php +++ b/Model/Data/ParameterDefinition/Restriction.php @@ -7,12 +7,11 @@ class Restriction extends DataObject implements RestrictionInterface { - const TYPE_FIELD_NAME = 'type'; const VALUE_FIELD_NAME = 'value'; /** - * @param string $type + * {@inheritDoc} */ public function setType(string $type) { @@ -20,15 +19,15 @@ public function setType(string $type) } /** - * @param mixed $value + * {@inheritDoc} */ - public function setValue($value) + public function setValue(mixed $value) { $this->setData(self::VALUE_FIELD_NAME, $value); } /** - * @return string|null + * {@inheritDoc} */ public function getType(): ?string { @@ -36,9 +35,9 @@ public function getType(): ?string } /** - * @return mixed + * {@inheritDoc} */ - public function getValue() + public function getValue(): mixed { return $this->getData(self::VALUE_FIELD_NAME); } diff --git a/Model/Data/ParameterFactory.php b/Model/Data/ParameterFactory.php index 7c1b1d1..78a418a 100644 --- a/Model/Data/ParameterFactory.php +++ b/Model/Data/ParameterFactory.php @@ -6,7 +6,6 @@ use Macopedia\Allegro\Api\Data\Parameter\ValuesIdsInterface; use Macopedia\Allegro\Api\Data\Parameter\ValuesInterface; use Macopedia\Allegro\Api\Data\ParameterDefinitionInterface; -use Macopedia\Allegro\Api\Data\ParameterInterface; use Macopedia\Allegro\Api\Data\ParameterInterfaceFactoryInterface; use Magento\Framework\ObjectManagerInterface; @@ -26,11 +25,9 @@ public function __construct(ObjectManagerInterface $objectManager) } /** - * @param string $type - * @return RangeInterface|ValuesIdsInterface|ValuesInterface - * @throws ParameterFactoryException + * {@inheritDoc} */ - public function create(string $type): ParameterInterface + public function create(string $type): RangeInterface|ValuesIdsInterface|ValuesInterface { if (!isset(self::TYPES[$type])) { throw new ParameterFactoryException(__('Requested parameter type does not exist')); @@ -40,11 +37,9 @@ public function create(string $type): ParameterInterface } /** - * @param ParameterDefinitionInterface $parameterDefinition - * @return RangeInterface|ValuesIdsInterface|ValuesInterface - * @throws ParameterFactoryException + * {@inheritDoc} */ - public function createFromDefinition(ParameterDefinitionInterface $parameterDefinition): ParameterInterface + public function createFromDefinition(ParameterDefinitionInterface $parameterDefinition): RangeInterface|ValuesIdsInterface|ValuesInterface { $parameter = $this->create($parameterDefinition->getFrontendType()); $parameter->setId($parameterDefinition->getId()); diff --git a/Model/Data/PublicationCommand.php b/Model/Data/PublicationCommand.php index e856bed..9542bc9 100644 --- a/Model/Data/PublicationCommand.php +++ b/Model/Data/PublicationCommand.php @@ -12,8 +12,7 @@ class PublicationCommand extends DataObject implements PublicationCommandInterfa const ACTION_FIELD_NAME = 'action'; /** - * @param string $offerId - * @return void + * {@inheritDoc} */ public function setOfferId(string $offerId) { @@ -21,8 +20,7 @@ public function setOfferId(string $offerId) } /** - * @param string $action - * @return void + * {@inheritDoc} */ public function setAction(string $action) { @@ -30,7 +28,7 @@ public function setAction(string $action) } /** - * @return string + * {@inheritDoc} */ public function getOfferId(): ?string { @@ -38,7 +36,7 @@ public function getOfferId(): ?string } /** - * @return string + * {@inheritDoc} */ public function getAction(): ?string { @@ -46,7 +44,7 @@ public function getAction(): ?string } /** - * @return array + * {@inheritDoc} */ public function getRawData(): array { diff --git a/Model/Data/ReturnPolicy.php b/Model/Data/ReturnPolicy.php index d2df894..f4485cb 100644 --- a/Model/Data/ReturnPolicy.php +++ b/Model/Data/ReturnPolicy.php @@ -11,8 +11,7 @@ class ReturnPolicy extends DataObject implements ReturnPolicyInterface const NAME_FIELD_NAME = 'name'; /** - * @param string $id - * @return void + * {@inheritDoc} */ public function setId(string $id) { @@ -20,8 +19,7 @@ public function setId(string $id) } /** - * @param string $name - * @return void + * {@inheritDoc} */ public function setName(string $name) { @@ -29,7 +27,7 @@ public function setName(string $name) } /** - * @return string + * {@inheritDoc} */ public function getId(): ?string { @@ -37,7 +35,7 @@ public function getId(): ?string } /** - * @return string + * {@inheritDoc} */ public function getName(): ?string { @@ -45,8 +43,7 @@ public function getName(): ?string } /** - * @param array $rawData - * @return void + * {@inheritDoc} */ public function setRawData(array $rawData) { diff --git a/Model/Data/Sales/Order/PickupPointExtensionAttributes.php b/Model/Data/Sales/Order/PickupPointExtensionAttributes.php index fc8b103..e9a4648 100644 --- a/Model/Data/Sales/Order/PickupPointExtensionAttributes.php +++ b/Model/Data/Sales/Order/PickupPointExtensionAttributes.php @@ -15,61 +15,97 @@ class PickupPointExtensionAttributes extends DataObject implements PickupPointEx const ZIP_CODE_FIELD_NAME = 'zip_code'; const CITY_FIELD_NAME = 'city'; + /** + * {@inheritDoc} + */ public function setPointId(?string $pointId) { $this->setData(self::POINT_ID_FIELD_NAME, $pointId); } + /** + * {@inheritDoc} + */ public function setName(?string $name) { $this->setData(self::NAME_FIELD_NAME, $name); } + /** + * {@inheritDoc} + */ public function setDescription(?string $description) { $this->setData(self::DESCRIPTION_FIELD_NAME, $description); } + /** + * {@inheritDoc} + */ public function setStreet(?string $street) { $this->setData(self::STREET_FIELD_NAME, $street); } + /** + * {@inheritDoc} + */ public function setZipCode(?string $zipCode) { $this->setData(self::ZIP_CODE_FIELD_NAME, $zipCode); } + /** + * {@inheritDoc} + */ public function setCity(?string $city) { $this->setData(self::CITY_FIELD_NAME, $city); } + /** + * {@inheritDoc} + */ public function getPointId(): ?string { return $this->getData(self::POINT_ID_FIELD_NAME); } + /** + * {@inheritDoc} + */ public function getName(): ?string { return $this->getData(self::NAME_FIELD_NAME); } + /** + * {@inheritDoc} + */ public function getDescription(): ?string { return $this->getData(self::DESCRIPTION_FIELD_NAME); } + /** + * {@inheritDoc} + */ public function getStreet(): ?string { return $this->getData(self::STREET_FIELD_NAME); } + /** + * {@inheritDoc} + */ public function getZipCode(): ?string { return $this->getData(self::ZIP_CODE_FIELD_NAME); } + /** + * {@inheritDoc} + */ public function getCity(): ?string { return $this->getData(self::CITY_FIELD_NAME); diff --git a/Model/Data/ShippingRate.php b/Model/Data/ShippingRate.php index d0fb206..5007fd8 100644 --- a/Model/Data/ShippingRate.php +++ b/Model/Data/ShippingRate.php @@ -12,7 +12,7 @@ class ShippingRate extends DataObject implements ShippingRateInterface const NAME_FIELD_NAME = 'name'; /** - * @param string $id + * {@inheritDoc} */ public function setId(string $id) { @@ -20,7 +20,7 @@ public function setId(string $id) } /** - * @param string $name + * {@inheritDoc} */ public function setName(string $name) { @@ -28,7 +28,7 @@ public function setName(string $name) } /** - * @return string|null + * {@inheritDoc} */ public function getId(): ?string { @@ -36,7 +36,7 @@ public function getId(): ?string } /** - * @return string|null + * {@inheritDoc} */ public function getName(): ?string { @@ -44,7 +44,7 @@ public function getName(): ?string } /** - * @param array $rawData + * {@inheritDoc} */ public function setRawData(array $rawData) { diff --git a/Model/Data/Warranty.php b/Model/Data/Warranty.php index c5c18eb..6e6be8d 100644 --- a/Model/Data/Warranty.php +++ b/Model/Data/Warranty.php @@ -11,8 +11,7 @@ class Warranty extends DataObject implements WarrantyInterface const NAME_FIELD_NAME = 'name'; /** - * @param string $id - * @return void + * {@inheritDoc} */ public function setId(string $id) { @@ -20,8 +19,7 @@ public function setId(string $id) } /** - * @param string $name - * @return void + * {@inheritDoc} */ public function setName(string $name) { @@ -29,7 +27,7 @@ public function setName(string $name) } /** - * @return string + * {@inheritDoc} */ public function getId(): ?string { @@ -37,7 +35,7 @@ public function getId(): ?string } /** - * @return string + * {@inheritDoc} */ public function getName(): ?string { @@ -45,8 +43,7 @@ public function getName(): ?string } /** - * @param array $rawData - * @return void + * {@inheritDoc} */ public function setRawData(array $rawData) { diff --git a/Model/DeliveryMethodRepository.php b/Model/DeliveryMethodRepository.php index 697f472..7fcc5d0 100644 --- a/Model/DeliveryMethodRepository.php +++ b/Model/DeliveryMethodRepository.php @@ -7,7 +7,6 @@ use Macopedia\Allegro\Api\DeliveryMethodRepositoryInterface; use Macopedia\Allegro\Model\Api\ClientResponseException; use Macopedia\Allegro\Model\ResourceModel\Sale\DeliveryMethod; -use Macopedia\Allegro\Model\Api\ClientException; class DeliveryMethodRepository implements DeliveryMethodRepositoryInterface { @@ -32,8 +31,7 @@ public function __construct( } /** - * @return DeliveryMethodInterface[] - * @throws ClientException + * {@inheritDoc} */ public function getList(): array { diff --git a/Model/EventRepository.php b/Model/EventRepository.php index 2cb6ded..9a9bb1d 100644 --- a/Model/EventRepository.php +++ b/Model/EventRepository.php @@ -6,7 +6,6 @@ use Macopedia\Allegro\Api\Data\EventInterfaceFactory; use Macopedia\Allegro\Api\EventRepositoryInterface; use Macopedia\Allegro\Model\Api\ClientResponseException; -use Macopedia\Allegro\Model\Api\ClientException; use Macopedia\Allegro\Model\ResourceModel\Order\Events; class EventRepository implements EventRepositoryInterface @@ -30,8 +29,7 @@ public function __construct(Events $events, EventInterfaceFactory $eventFactory) } /** - * @return EventInterface[] - * @throws ClientException + * {@inheritDoc} */ public function getList(): array { @@ -54,9 +52,7 @@ public function getList(): array } /** - * @param string $from - * @return EventInterface[] - * @throws ClientException + * {@inheritDoc} */ public function getListFrom(string $from): array { diff --git a/Model/ImageRepository.php b/Model/ImageRepository.php index 6b78775..4d21325 100644 --- a/Model/ImageRepository.php +++ b/Model/ImageRepository.php @@ -4,10 +4,8 @@ use Macopedia\Allegro\Api\Data\ImageInterface; use Macopedia\Allegro\Api\ImageRepositoryInterface; -use Macopedia\Allegro\Model\Api\ClientResponseException; use Macopedia\Allegro\Model\ResourceModel\Sale\Images; use Magento\Framework\Exception\CouldNotSaveException; -use Macopedia\Allegro\Model\Api\ClientException; class ImageRepository implements ImageRepositoryInterface { @@ -25,8 +23,7 @@ public function __construct(Images $images) } /** - * @param ImageInterface $image - * @throws CouldNotSaveException + * {@inheritDoc} */ public function save(ImageInterface $image) { diff --git a/Model/ImpliedWarrantyRepository.php b/Model/ImpliedWarrantyRepository.php index 126039a..bb768b5 100644 --- a/Model/ImpliedWarrantyRepository.php +++ b/Model/ImpliedWarrantyRepository.php @@ -5,7 +5,6 @@ use Macopedia\Allegro\Api\Data\ImpliedWarrantyInterface; use Macopedia\Allegro\Api\Data\ImpliedWarrantyInterfaceFactory; use Macopedia\Allegro\Api\ImpliedWarrantyRepositoryInterface; -use Macopedia\Allegro\Model\Api\ClientException; use Macopedia\Allegro\Model\Api\ClientResponseException; use Macopedia\Allegro\Model\ResourceModel\Sale\AfterSaleServices; @@ -32,8 +31,7 @@ public function __construct( } /** - * @return ImpliedWarrantyInterface[] - * @throws ClientException + * {@inheritDoc} */ public function getList(): array { diff --git a/Model/OfferRepository.php b/Model/OfferRepository.php index 12fb5ba..934f05f 100644 --- a/Model/OfferRepository.php +++ b/Model/OfferRepository.php @@ -11,11 +11,9 @@ use Magento\Framework\Exception\CouldNotSaveException; use Magento\Framework\Exception\NoSuchEntityException; use Macopedia\Allegro\Model\Api\ClientResponseException; -use Macopedia\Allegro\Model\Api\ClientException; class OfferRepository implements OfferRepositoryInterface { - /** @var Offers */ private $offers; @@ -42,9 +40,7 @@ public function __construct( } /** - * @param OfferInterface $offer - * @throws ClientException - * @throws CouldNotSaveException + * {@inheritDoc} */ public function save(OfferInterface $offer) { @@ -77,10 +73,7 @@ public function save(OfferInterface $offer) } /** - * @param string $offerId - * @return OfferInterface - * @throws ClientException - * @throws NoSuchEntityException + * {@inheritDoc} */ public function get(string $offerId): OfferInterface { diff --git a/Model/OrderImporter/AllegroReservation.php b/Model/OrderImporter/AllegroReservation.php index a70fd71..fb20606 100644 --- a/Model/OrderImporter/AllegroReservation.php +++ b/Model/OrderImporter/AllegroReservation.php @@ -113,8 +113,7 @@ public function __construct( } /** - * @param CheckoutFormInterface $checkoutForm - * @throws \Exception + * {@inheritDoc} */ public function placeReservation(CheckoutFormInterface $checkoutForm): void { @@ -137,8 +136,7 @@ public function placeReservation(CheckoutFormInterface $checkoutForm): void } /** - * @param string $checkoutFormId - * @throws ReservationPlacingException + * {@inheritDoc} */ public function compensateReservation(string $checkoutFormId): void { diff --git a/Model/OrderLog.php b/Model/OrderLog.php index ba0909f..b6c4ddd 100644 --- a/Model/OrderLog.php +++ b/Model/OrderLog.php @@ -25,7 +25,7 @@ protected function _construct() } /** - * @param string $checkoutFormId + * {@inheritDoc} */ public function setCheckoutFormId(string $checkoutFormId): void { @@ -33,7 +33,7 @@ public function setCheckoutFormId(string $checkoutFormId): void } /** - * @param string $date + * {@inheritDoc} */ public function setDateOfFirstTry(string $date): void { @@ -41,7 +41,7 @@ public function setDateOfFirstTry(string $date): void } /** - * @param string $date + * {@inheritDoc} */ public function setDateOfLastTry(string $date): void { @@ -49,7 +49,7 @@ public function setDateOfLastTry(string $date): void } /** - * @param string $reason + * {@inheritDoc} */ public function setReason(string $reason): void { @@ -57,7 +57,7 @@ public function setReason(string $reason): void } /** - * @param int $tries + * {@inheritDoc} */ public function setNumberOfTries(int $tries): void { @@ -65,7 +65,7 @@ public function setNumberOfTries(int $tries): void } /** - * @return string|null + * {@inheritDoc} */ public function getCheckoutFormId(): ?string { @@ -73,7 +73,7 @@ public function getCheckoutFormId(): ?string } /** - * @return string|null + * {@inheritDoc} */ public function getDateOfFirstTry(): ?string { @@ -81,7 +81,7 @@ public function getDateOfFirstTry(): ?string } /** - * @return string|null + * {@inheritDoc} */ public function getDateOfLastTry(): ?string { @@ -89,7 +89,7 @@ public function getDateOfLastTry(): ?string } /** - * @return string|null + * {@inheritDoc} */ public function getReason(): ?string { @@ -97,7 +97,7 @@ public function getReason(): ?string } /** - * @return int + * {@inheritDoc} */ public function getNumberOfTries(): int { diff --git a/Model/OrderLogRepository.php b/Model/OrderLogRepository.php index 9633d8b..d87a5dd 100644 --- a/Model/OrderLogRepository.php +++ b/Model/OrderLogRepository.php @@ -50,8 +50,7 @@ public function __construct( } /** - * @param SearchCriteriaInterface $searchCriteria - * @return array + * {@inheritDoc} */ public function getList(SearchCriteriaInterface $searchCriteria): array { @@ -65,7 +64,7 @@ public function getList(SearchCriteriaInterface $searchCriteria): array } /** - * @return int + * {@inheritDoc} */ public function getCount(): int { @@ -74,8 +73,7 @@ public function getCount(): int } /** - * @param OrderLogInterface $orderLog - * @throws CouldNotSaveException + * {@inheritDoc} */ public function save(OrderLogInterface $orderLog): void { @@ -90,8 +88,7 @@ public function save(OrderLogInterface $orderLog): void } /** - * @param OrderLogInterface $orderLog - * @throws CouldNotDeleteException + * {@inheritDoc} */ public function delete(OrderLogInterface $orderLog): void { @@ -106,9 +103,7 @@ public function delete(OrderLogInterface $orderLog): void } /** - * @param string $checkoutFormId - * @return OrderLogInterface - * @throws NoSuchEntityException + * {@inheritDoc} */ public function getByCheckoutFormId(string $checkoutFormId): OrderLogInterface { @@ -127,8 +122,7 @@ public function getByCheckoutFormId(string $checkoutFormId): OrderLogInterface } /** - * @param string $checkoutFormId - * @throws CouldNotDeleteException + * {@inheritDoc} */ public function deleteByCheckoutFormId(string $checkoutFormId): void { diff --git a/Model/OrderRepository.php b/Model/OrderRepository.php index 86c22d8..2117bbb 100644 --- a/Model/OrderRepository.php +++ b/Model/OrderRepository.php @@ -10,7 +10,6 @@ use Magento\Sales\Api\Data\OrderInterface; use Magento\Sales\Api\Data\OrderSearchResultInterfaceFactory as SearchResultFactory; use Magento\Sales\Model\ResourceModel\Metadata; -use Magento\Sales\Model\ResourceModel\Order\CollectionFactory; use Magento\Tax\Api\OrderTaxManagementInterface; use Magento\Sales\Api\Data\OrderExtensionFactory; use Macopedia\Allegro\Model\ResourceModel\Order as ResourceModel; @@ -55,10 +54,7 @@ public function __construct( } /** - * @param string $externalId - * @return OrderInterface - * @throws NoSuchEntityException - * @throws \Magento\Framework\Exception\InputException + * {@inheritDoc} */ public function getByExternalId(string $externalId): OrderInterface { diff --git a/Model/ParameterDefinitionRepository.php b/Model/ParameterDefinitionRepository.php index 374aa28..26b3088 100644 --- a/Model/ParameterDefinitionRepository.php +++ b/Model/ParameterDefinitionRepository.php @@ -4,12 +4,10 @@ use Macopedia\Allegro\Api\Data\ParameterDefinitionInterface; use Macopedia\Allegro\Api\Data\ParameterDefinitionInterfaceFactory; -use Macopedia\Allegro\Api\Data\ParameterInterface; use Macopedia\Allegro\Api\Data\ParameterInterfaceFactoryInterface; use Macopedia\Allegro\Api\ParameterDefinitionRepositoryInterface; use Macopedia\Allegro\Model\Api\ClientResponseException; use Macopedia\Allegro\Model\ResourceModel\Sale\Categories; -use Macopedia\Allegro\Model\Api\ClientException; class ParameterDefinitionRepository implements ParameterDefinitionRepositoryInterface { @@ -40,9 +38,7 @@ public function __construct( } /** - * @param int $categoryId - * @return ParameterDefinitionInterface[] - * @throws ClientException + * {@inheritDoc} */ public function getListByCategoryId(int $categoryId): array { @@ -65,9 +61,7 @@ public function getListByCategoryId(int $categoryId): array } /** - * @param int $categoryId - * @return ParameterInterface[] - * @throws ClientException + * {@inheritDoc} */ public function createParametersByCategoryId(int $categoryId): array { diff --git a/Model/PriceCommand.php b/Model/PriceCommand.php index 67447fa..ae035cd 100644 --- a/Model/PriceCommand.php +++ b/Model/PriceCommand.php @@ -3,9 +3,7 @@ namespace Macopedia\Allegro\Model; use Macopedia\Allegro\Api\PriceCommandInterface; -use Macopedia\Allegro\Model\Api\ClientResponseException; use Macopedia\Allegro\Model\ResourceModel\Sale\Offers; -use Macopedia\Allegro\Model\Api\ClientException; class PriceCommand implements PriceCommandInterface { @@ -23,12 +21,7 @@ public function __construct(Offers $offers) } /** - * @param string $offerId - * @param float $price - * @return array - * @throws Api\ClientResponseErrorException - * @throws ClientException - * @throws ClientResponseException + * {@inheritDoc} */ public function change(string $offerId, float $price) { diff --git a/Model/ProductRepository.php b/Model/ProductRepository.php index da5f5ab..715b4ce 100644 --- a/Model/ProductRepository.php +++ b/Model/ProductRepository.php @@ -83,12 +83,7 @@ public function __construct( } /** - * @param int $allegroOfferId - * @param bool $editMode - * @param int $storeId - * @param bool $forceReload - * @return ProductInterface - * @throws NoSuchEntityException + * {@inheritDoc} */ public function getByAllegroOfferId( int $allegroOfferId, diff --git a/Model/PublicationCommandRepository.php b/Model/PublicationCommandRepository.php index 6c8e6a2..ef096c4 100644 --- a/Model/PublicationCommandRepository.php +++ b/Model/PublicationCommandRepository.php @@ -7,7 +7,6 @@ use Macopedia\Allegro\Model\Api\ClientResponseException; use Macopedia\Allegro\Model\ResourceModel\Sale\Offers; use Magento\Framework\Exception\CouldNotSaveException; -use Macopedia\Allegro\Model\Api\ClientException; class PublicationCommandRepository implements PublicationCommandRepositoryInterface { @@ -25,9 +24,7 @@ public function __construct(Offers $offers) } /** - * @param PublicationCommandInterface $publication - * @throws ClientException - * @throws CouldNotSaveException + * {@inheritDoc} */ public function save(PublicationCommandInterface $publication) { diff --git a/Model/QuantityCommand.php b/Model/QuantityCommand.php index d7e49a6..f19cc59 100644 --- a/Model/QuantityCommand.php +++ b/Model/QuantityCommand.php @@ -2,13 +2,8 @@ namespace Macopedia\Allegro\Model; -use Macopedia\Allegro\Api\Data\PublicationCommandInterface; -use Macopedia\Allegro\Api\PublicationCommandRepositoryInterface; use Macopedia\Allegro\Api\QuantityCommandInterface; -use Macopedia\Allegro\Model\Api\ClientResponseException; use Macopedia\Allegro\Model\ResourceModel\Sale\Offers; -use Magento\Framework\Exception\CouldNotSaveException; -use Macopedia\Allegro\Model\Api\ClientException; class QuantityCommand implements QuantityCommandInterface { @@ -26,12 +21,7 @@ public function __construct(Offers $offers) } /** - * @param $offerId - * @param $qty - * @return array - * @throws Api\ClientResponseErrorException - * @throws ClientException - * @throws ClientResponseException + * {@inheritDoc} */ public function change($offerId, $qty) { diff --git a/Model/ReturnPolicyRepository.php b/Model/ReturnPolicyRepository.php index 98c1b3d..8a036ae 100644 --- a/Model/ReturnPolicyRepository.php +++ b/Model/ReturnPolicyRepository.php @@ -5,7 +5,6 @@ use Macopedia\Allegro\Api\Data\ReturnPolicyInterface; use Macopedia\Allegro\Api\Data\ReturnPolicyInterfaceFactory; use Macopedia\Allegro\Api\ReturnPolicyRepositoryInterface; -use Macopedia\Allegro\Model\Api\ClientException; use Macopedia\Allegro\Model\Api\ClientResponseException; use Macopedia\Allegro\Model\ResourceModel\Sale\AfterSaleServices; @@ -32,8 +31,7 @@ public function __construct( } /** - * @return ReturnPolicyInterface[] - * @throws ClientException + * {@inheritDoc} */ public function getList(): array { diff --git a/Model/ShippingRateRepository.php b/Model/ShippingRateRepository.php index 71ae1f4..4860d7c 100644 --- a/Model/ShippingRateRepository.php +++ b/Model/ShippingRateRepository.php @@ -5,7 +5,6 @@ use Macopedia\Allegro\Api\Data\ShippingRateInterface; use Macopedia\Allegro\Api\Data\ShippingRateInterfaceFactory; use Macopedia\Allegro\Api\ShippingRateRepositoryInterface; -use Macopedia\Allegro\Model\Api\ClientException; use Macopedia\Allegro\Model\Api\ClientResponseException; use Macopedia\Allegro\Model\ResourceModel\Sale\ShippingRates; @@ -20,6 +19,7 @@ class ShippingRateRepository implements ShippingRateRepositoryInterface /** * ShippingRatesRepository constructor. * @param ShippingRates $shippingRates + * @param ShippingRateInterfaceFactory $shippingRateFactory */ public function __construct( ShippingRates $shippingRates, @@ -30,8 +30,7 @@ public function __construct( } /** - * @return ShippingRateInterface[] - * @throws ClientException + * {@inheritDoc} */ public function getList(): array { diff --git a/Model/WarrantyRepository.php b/Model/WarrantyRepository.php index 389bc4b..98e8652 100644 --- a/Model/WarrantyRepository.php +++ b/Model/WarrantyRepository.php @@ -32,8 +32,7 @@ public function __construct( } /** - * @return WarrantyInterface[] - * @throws ClientException + * {@inheritDoc} */ public function getList(): array {