Skip to content

Commit

Permalink
More PHPDocs work in library/cart
Browse files Browse the repository at this point in the history
  • Loading branch information
TheCartpenter committed Jan 1, 2025
1 parent 288dc90 commit ffb0b7e
Show file tree
Hide file tree
Showing 7 changed files with 62 additions and 62 deletions.
38 changes: 19 additions & 19 deletions upload/system/library/cart/cart.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ public function __construct(object $registry) {
}

/**
* getProducts
* Get Products
*
* @return array<int, array<string, mixed>>
* @return array<int, array<string, mixed>> product records
*/
public function getProducts(): array {
$product_data = [];
Expand Down Expand Up @@ -317,10 +317,10 @@ public function getProducts(): array {
/**
* Add
*
* @param int $product_id
* @param int $product_id primary key of the product record
* @param int $quantity
* @param array<mixed> $option
* @param int $subscription_plan_id
* @param int $subscription_plan_id primary key of the subscription plan record
* @param bool $override
* @param float $price
*
Expand All @@ -345,7 +345,7 @@ public function add(int $product_id, int $quantity = 1, array $option = [], int
/**
* Update
*
* @param int $cart_id
* @param int $cart_id primary key of the cart record
* @param int $quantity
*
* @return void
Expand All @@ -363,7 +363,7 @@ public function update(int $cart_id, int $quantity): void {
/**
* Remove
*
* @param int $cart_id
* @param int $cart_id primary key of the cart record
*
* @return void
*/
Expand All @@ -385,9 +385,9 @@ public function clear(): void {
}

/**
* getSubscriptions
* Get Subscriptions
*
* @return array<int, array<string, mixed>>
* @return array<int, array<string, mixed>> subscription records
*/
public function getSubscriptions(): array {
$product_data = [];
Expand All @@ -402,7 +402,7 @@ public function getSubscriptions(): array {
}

/**
* getWeight
* Get Weight
*
* @return float
*/
Expand All @@ -419,7 +419,7 @@ public function getWeight(): float {
}

/**
* getSubtotal
* Get Sub Total
*
* @return float
*/
Expand All @@ -434,9 +434,9 @@ public function getSubTotal(): float {
}

/**
* getTaxes
* Get Taxes
*
* @return array<int, array<string, mixed>>
* @return array<int, float>
*/
public function getTaxes(): array {
$tax_data = [];
Expand All @@ -459,7 +459,7 @@ public function getTaxes(): array {
}

/**
* getTotal
* Get Total
*
* @return float
*/
Expand All @@ -474,7 +474,7 @@ public function getTotal(): float {
}

/**
* countProducts
* Count Products
*
* @return int
*/
Expand All @@ -491,7 +491,7 @@ public function countProducts(): int {
}

/**
* hasProducts
* Has Products
*
* @return bool
*/
Expand All @@ -500,7 +500,7 @@ public function hasProducts(): bool {
}

/**
* hasSubscription
* Has Subscription
*
* @return bool
*/
Expand All @@ -509,7 +509,7 @@ public function hasSubscription(): bool {
}

/**
* hasStock
* Has Stock
*
* @return bool
*/
Expand All @@ -524,7 +524,7 @@ public function hasStock(): bool {
}

/**
* hasShipping
* Has Shipping
*
* @return bool
*/
Expand All @@ -539,7 +539,7 @@ public function hasShipping(): bool {
}

/**
* hasDownload
* Has Download
*
* @return bool
*/
Expand Down
10 changes: 5 additions & 5 deletions upload/system/library/cart/currency.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public function convert(float $value, string $from, string $to): float {
}

/**
* getId
* Get ID
*
* @param string $currency
*
Expand All @@ -123,7 +123,7 @@ public function getId(string $currency): int {
}

/**
* getSymbolLeft
* Get Symbol Left
*
* @param string $currency
*
Expand All @@ -138,7 +138,7 @@ public function getSymbolLeft(string $currency): string {
}

/**
* getSymbolRight
* Get Symbol Right
*
* @param string $currency
*
Expand All @@ -153,7 +153,7 @@ public function getSymbolRight(string $currency): string {
}

/**
* getDecimalPlace
* Get Decimal Place
*
* @param string $currency
*
Expand All @@ -168,7 +168,7 @@ public function getDecimalPlace(string $currency): string {
}

/**
* getValue
* Get Value
*
* @param string $currency
*
Expand Down
22 changes: 11 additions & 11 deletions upload/system/library/cart/customer.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ public function logout(): void {
}

/**
* isLogged
* Is Logged
*
* @return bool
*/
Expand All @@ -150,7 +150,7 @@ public function isLogged(): bool {
}

/**
* getId
* Get ID
*
* @return int
*/
Expand All @@ -159,7 +159,7 @@ public function getId(): int {
}

/**
* getFirstName
* Get First Name
*
* @return string
*/
Expand All @@ -168,7 +168,7 @@ public function getFirstName(): string {
}

/**
* getLastName
* Get Last Name
*
* @return string
*/
Expand All @@ -177,7 +177,7 @@ public function getLastName(): string {
}

/**
* getGroupId
* Get Group ID
*
* @return int
*/
Expand All @@ -186,7 +186,7 @@ public function getGroupId(): int {
}

/**
* getEmail
* Get Email
*
* @return string
*/
Expand All @@ -195,7 +195,7 @@ public function getEmail(): string {
}

/**
* getTelephone
* Get Telephone
*
* @return string
*/
Expand All @@ -204,7 +204,7 @@ public function getTelephone(): string {
}

/**
* getNewsletter
* Get Newsletter
*
* @return bool
*/
Expand All @@ -213,7 +213,7 @@ public function getNewsletter(): bool {
}

/**
* getAddressId
* Get Address ID
*
* @return int
*/
Expand All @@ -228,7 +228,7 @@ public function getAddressId(): int {
}

/**
* getBalance
* Get Balance
*
* @return float
*/
Expand All @@ -239,7 +239,7 @@ public function getBalance(): float {
}

/**
* getRewardPoints
* Get Reward Points
*
* @return float
*/
Expand Down
6 changes: 3 additions & 3 deletions upload/system/library/cart/length.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public function convert(float $value, string $from, string $to): float {
* Format
*
* @param float $value
* @param int $length_class_id
* @param int $length_class_id primary key of the length class record
* @param string $decimal_point
* @param string $thousand_point
*
Expand All @@ -83,9 +83,9 @@ public function format(float $value, int $length_class_id, string $decimal_point
}

/**
* getUnit
* Get Unit
*
* @param int $length_class_id
* @param int $length_class_id primary key of the length class record
*
* @return string
*/
Expand Down
30 changes: 15 additions & 15 deletions upload/system/library/cart/tax.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ public function __construct(object $registry) {
}

/**
* setShippingAddress
* Set Shipping Address
*
* @param int $country_id
* @param int $zone_id
* @param int $country_id primary key of the country record
* @param int $zone_id primary key of the zone record
*
* @return void
*/
Expand All @@ -47,10 +47,10 @@ public function setShippingAddress(int $country_id, int $zone_id): void {
}

/**
* setPaymentAddress
* Set Payment Address
*
* @param int $country_id
* @param int $zone_id
* @param int $country_id primary key of the country record
* @param int $zone_id primary key of the zone record
*
* @return void
*/
Expand All @@ -69,10 +69,10 @@ public function setPaymentAddress(int $country_id, int $zone_id): void {
}

/**
* setStoreAddress
* Set Store Address
*
* @param int $country_id
* @param int $zone_id
* @param int $country_id primary key of the country record
* @param int $zone_id primary key of the zone record
*
* @return void
*/
Expand All @@ -94,7 +94,7 @@ public function setStoreAddress(int $country_id, int $zone_id): void {
* Calculate
*
* @param float $value
* @param int $tax_class_id
* @param int $tax_class_id primary key of the tax class record
* @param bool $calculate
*
* @return float
Expand All @@ -120,10 +120,10 @@ public function calculate(float $value, int $tax_class_id, bool $calculate = tru
}

/**
* getTax
* Get Tax
*
* @param float $value
* @param int $tax_class_id
* @param int $tax_class_id primary key of the tax class record
*
* @return float
*/
Expand All @@ -140,9 +140,9 @@ public function getTax(float $value, int $tax_class_id): float {
}

/**
* getRateName
* Get Rate Name
*
* @param int $tax_rate_id
* @param int $tax_rate_id primary key of the tax rate record
*
* @return string
*/
Expand All @@ -160,7 +160,7 @@ public function getRateName(int $tax_rate_id): string {
* getRates
*
* @param float $value
* @param int $tax_class_id
* @param int $tax_class_id primary key of the tax class record
*
* @return array<int, array<string, mixed>>
*/
Expand Down
Loading

0 comments on commit ffb0b7e

Please sign in to comment.