Skip to content

Commit

Permalink
Apply php-cs-fixer changes
Browse files Browse the repository at this point in the history
  • Loading branch information
markus-moser authored and github-actions[bot] committed May 3, 2024
1 parent cd319e3 commit f1b8a2e
Show file tree
Hide file tree
Showing 223 changed files with 9 additions and 2,101 deletions.
3 changes: 0 additions & 3 deletions src/AvailabilitySystem/AvailabilitySystem.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@

class AvailabilitySystem implements AvailabilitySystemInterface
{
/**
* {@inheritdoc}
*/
public function getAvailabilityInfo(CheckoutableInterface $product, int $quantityScale = 1, array $products = null): Availability|AvailabilityInterface
{
return new Availability($product, true);
Expand Down
4 changes: 0 additions & 4 deletions src/AvailabilitySystem/AvailabilitySystemInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,7 @@ interface AvailabilitySystemInterface
/**
* Get availability info for a given product
*
* @param CheckoutableInterface $product
* @param int $quantityScale
* @param array|null $products
*
* @return AvailabilityInterface
*/
public function getAvailabilityInfo(CheckoutableInterface $product, int $quantityScale = 1, array $products = null): AvailabilityInterface;
}
47 changes: 0 additions & 47 deletions src/CartManager/AbstractCart.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,8 @@ abstract protected function getCartCheckoutDataClassName(): string;

/**
* @param CheckoutableInterface&Concrete $product
* @param int $count
* @param string|null $itemKey
* @param bool $replace
* @param array $params
* @param AbstractSetProductEntry[] $subProducts
* @param string|null $comment
*
* @return string
*/
public function addItem(CheckoutableInterface $product, int $count, string $itemKey = null, bool $replace = false, array $params = [], array $subProducts = [], string $comment = null): string
{
Expand All @@ -104,15 +98,9 @@ public function addItem(CheckoutableInterface $product, int $count, string $item
}

/**
* @param string $itemKey
* @param CheckoutableInterface&Concrete $product
* @param int $count
* @param bool $replace
* @param array $params
* @param AbstractSetProductEntry[] $subProducts
* @param string|null $comment
*
* @return string
*/
public function updateItem(string $itemKey, CheckoutableInterface $product, int $count, bool $replace = false, array $params = [], array $subProducts = [], string $comment = null): string
{
Expand Down Expand Up @@ -169,10 +157,7 @@ public function updateItem(string $itemKey, CheckoutableInterface $product, int
/**
* updates count of specific cart item
*
* @param string $itemKey
* @param int $count
*
* @return CartItemInterface
*/
public function updateItemCount(string $itemKey, int $count): CartItemInterface
{
Expand All @@ -188,14 +173,7 @@ public function updateItemCount(string $itemKey, int $count): CartItemInterface

/**
* @param CheckoutableInterface&Concrete $product
* @param int $count
* @param string|null $itemKey
* @param bool $replace
* @param array $params
* @param array $subProducts
* @param string|null $comment
*
* @return string
*/
public function addGiftItem(CheckoutableInterface $product, int $count, string $itemKey = null, bool $replace = false, array $params = [], array $subProducts = [], string $comment = null): string
{
Expand All @@ -211,15 +189,8 @@ public function addGiftItem(CheckoutableInterface $product, int $count, string $
}

/**
* @param string $itemKey
* @param CheckoutableInterface&Concrete $product
* @param int $count
* @param bool $replace
* @param array $params
* @param array $subProducts
* @param string|null $comment
*
* @return string
*/
public function updateGiftItem(string $itemKey, CheckoutableInterface $product, int $count, bool $replace = false, array $params = [], array $subProducts = [], string $comment = null): string
{
Expand Down Expand Up @@ -281,8 +252,6 @@ public function clear(): void
/**
* @param string $countSubItems - use one of COUNT_MAIN_ITEMS_ONLY, COUNT_MAIN_OR_SUB_ITEMS, COUNT_MAIN_AND_SUB_ITEMS
*
* @return int
*
* @throws InvalidConfigException
*/
public function getItemAmount(string $countSubItems = self::COUNT_MAIN_ITEMS_ONLY): int
Expand Down Expand Up @@ -354,8 +323,6 @@ public function getItemAmount(string $countSubItems = self::COUNT_MAIN_ITEMS_ONL
/**
* @param string $countSubItems - use one of COUNT_MAIN_ITEMS_ONLY, COUNT_MAIN_OR_SUB_ITEMS, COUNT_MAIN_AND_SUB_ITEMS
*
* @return int
*
* @throws InvalidConfigException
*/
public function getItemCount(string $countSubItems = self::COUNT_MAIN_ITEMS_ONLY): int
Expand Down Expand Up @@ -519,9 +486,6 @@ public function getCreationDate(): \DateTime
return $this->creationDate;
}

/**
* @param \DateTime|null $creationDate
*/
public function setCreationDate(\DateTime $creationDate = null): void
{
$this->creationDate = $creationDate;
Expand Down Expand Up @@ -553,9 +517,6 @@ public function getModificationDate(): ?\DateTime
return $this->modificationDate;
}

/**
* @param \DateTime|null $modificationDate
*/
public function setModificationDate(\DateTime $modificationDate = null): void
{
$this->modificationDate = $modificationDate;
Expand Down Expand Up @@ -649,7 +610,6 @@ public function modified(): static
}

/**
* @param int $count
*
* @return array<int, CartItemInterface>
*/
Expand All @@ -668,7 +628,6 @@ public function getRecentlyAddedItems(int $count): array
/**
* sorts all items in cart according to a given callback function
*
* @param callable $value_compare_func
*
* @return $this
*/
Expand All @@ -680,9 +639,7 @@ public function sortItems(callable $value_compare_func): static
/**
* Adds a voucher token to the cart's checkout data and reserves it.
*
* @param string $code
*
* @return bool
*
* @throws \Exception
*/
Expand Down Expand Up @@ -724,9 +681,7 @@ public function removeAllVoucherTokens(): void
/**
* Removes a token from cart and releases token reservation.
*
* @param string $code
*
* @return bool
*
* @throws \Exception
*/
Expand Down Expand Up @@ -806,9 +761,7 @@ protected function validateVoucherTokenReservations(): void
/**
* Should be added to the cart
*
* @param CartItemInterface $item
*
* @return bool
*/
protected static function isValidCartItem(CartItemInterface $item): bool
{
Expand Down
7 changes: 0 additions & 7 deletions src/CartManager/AbstractCartItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ abstract class AbstractCartItem extends \Pimcore\Model\AbstractModel implements
/**
* flag needed for preventing call modified on cart when loading cart from storage
*
* @var bool
*/
protected bool $isLoading = false;

Expand Down Expand Up @@ -167,7 +166,6 @@ public function getItemKey(): string
/**
* @param CartItemInterface[] $subItems
*
* @return void
*/
public function setSubItems(array $subItems): void
{
Expand Down Expand Up @@ -244,9 +242,6 @@ public function getTotalPrice(): PriceInterface
return $this->getPriceInfo()->getTotalPrice();
}

/**
* @param \DateTime|null $date
*/
public function setAddedDate(\DateTime $date = null): void
{
if ($date) {
Expand Down Expand Up @@ -279,7 +274,6 @@ public function setAddedDateTimestamp(int $time): void
/**
* get item name
*
* @return string
*/
public function getName(): string
{
Expand All @@ -290,7 +284,6 @@ public function getName(): string
* Flag needed for preventing call modified on cart when loading cart from storage
* only for internal usage
*
* @param bool $isLoading
*
* @internal
*/
Expand Down
3 changes: 0 additions & 3 deletions src/CartManager/Cart.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,6 @@ public function getItems(): array
/**
* @param string $countSubItems - use one of COUNT_MAIN_ITEMS_ONLY, COUNT_MAIN_OR_SUB_ITEMS, COUNT_MAIN_AND_SUB_ITEMS
*
* @return int
*/
public function getItemCount(string $countSubItems = self::COUNT_MAIN_ITEMS_ONLY): int
{
Expand Down Expand Up @@ -179,9 +178,7 @@ public function getItemAmount(string $countSubItems = self::COUNT_MAIN_ITEMS_ONL
/**
* @static
*
* @param int $userId
*
* @return array
*/
public static function getAllCartsForUser(int $userId): array
{
Expand Down
4 changes: 0 additions & 4 deletions src/CartManager/Cart/Dao.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ class Dao extends \Pimcore\Model\Dao\AbstractDao
/**
* Contains all valid columns in the database table
*
* @var array
*/
protected array $validColumns = [];

Expand All @@ -39,15 +38,13 @@ class Dao extends \Pimcore\Model\Dao\AbstractDao
/**
* Get the valid columns from the database
*
* @return void
*/
public function init(): void
{
$this->validColumns = $this->getValidTableColumns(self::TABLE_NAME);
}

/**
* @param int $id
*
* @throws NotFoundException
*/
Expand Down Expand Up @@ -98,7 +95,6 @@ public function update(): void
/**
* Deletes object from database
*
* @return void
*/
public function delete(): void
{
Expand Down
1 change: 0 additions & 1 deletion src/CartManager/Cart/Listing.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ public function __construct()
/**
* @param string $key The key to check
*
* @return bool
*/
public function isValidOrderKey(string $key): bool
{
Expand Down
5 changes: 0 additions & 5 deletions src/CartManager/CartCheckoutData/Dao.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ class Dao extends \Pimcore\Model\Dao\AbstractDao
/**
* Contains all valid columns in the database table
*
* @var array
*/
protected array $validColumns = [];

Expand All @@ -40,16 +39,13 @@ class Dao extends \Pimcore\Model\Dao\AbstractDao
/**
* Get the valid columns from the database
*
* @return void
*/
public function init(): void
{
$this->validColumns = $this->getValidTableColumns(self::TABLE_NAME);
}

/**
* @param string $key
* @param int|string $cartId
*
* @throws NotFoundException
*/
Expand Down Expand Up @@ -97,7 +93,6 @@ public function update(): void
/**
* Deletes object from database
*
* @return void
*/
public function delete(): void
{
Expand Down
8 changes: 0 additions & 8 deletions src/CartManager/CartFactoryInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,5 @@ interface CartFactoryInterface
{
public function getCartClassName(EnvironmentInterface $environment): string;

/**
* @param EnvironmentInterface $environment
* @param string $name
* @param string|null $id
* @param array $options
*
* @return CartInterface
*/
public function create(EnvironmentInterface $environment, string $name, string $id = null, array $options = []): CartInterface;
}
Loading

0 comments on commit f1b8a2e

Please sign in to comment.