Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Codebase cleanup #307

Merged
merged 1 commit into from
Sep 3, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 3 additions & 13 deletions src/Checker/PromotionCouponEligibilityChecker.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,12 @@

final class PromotionCouponEligibilityChecker implements PromotionCouponEligibilityCheckerInterface
{
/**
* @var PromotionEligibilityCheckerInterface
*/
/** @var PromotionEligibilityCheckerInterface */
private $promotionEligibilityChecker;

/**
* @var PromotionCouponEligibilityCheckerInterface
*/
/** @var PromotionCouponEligibilityCheckerInterface */
private $couponEligibilityChecker;

/**
* @param PromotionEligibilityCheckerInterface $promotionEligibilityChecker
* @param PromotionCouponEligibilityCheckerInterface $couponEligibilityChecker
*/
public function __construct(
PromotionEligibilityCheckerInterface $promotionEligibilityChecker,
PromotionCouponEligibilityCheckerInterface $couponEligibilityChecker
Expand All @@ -36,9 +28,7 @@ public function __construct(
$this->couponEligibilityChecker = $couponEligibilityChecker;
}

/**
* {@inheritdoc}
*/
/** {@inheritdoc} */
public function isEligible(PromotionSubjectInterface $cart, PromotionCouponInterface $coupon): bool
{
/** @var OrderInterface $cart */
Expand Down
18 changes: 2 additions & 16 deletions src/Command/AddCoupon.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,37 +6,23 @@

final class AddCoupon
{
/**
* @var string
*/
/** @var string */
private $orderToken;

/**
* @var string
*/
/** @var string */
private $couponCode;

/**
* @param string $orderToken
* @param string $couponCode
*/
public function __construct(string $orderToken, string $couponCode)
{
$this->orderToken = $orderToken;
$this->couponCode = $couponCode;
}

/**
* @return string
*/
public function orderToken(): string
{
return $this->orderToken;
}

/**
* @return string
*/
public function couponCode(): string
{
return $this->couponCode;
Expand Down
24 changes: 6 additions & 18 deletions src/Command/AddProductReviewByCode.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,34 +6,22 @@

final class AddProductReviewByCode
{
/**
* @var string
*/
/** @var string */
private $productCode;

/**
* @var string
*/
/** @var string */
private $channelCode;

/**
* @var string
*/
/** @var string */
private $title;

/**
* @var int
*/
/** @var int */
private $rating;

/**
* @var string
*/
/** @var string */
private $comment;

/**
* @var string
*/
/** @var string */
private $email;

public function __construct(string $productCode, string $channelCode, string $title, int $rating, string $comment, string $email)
Expand Down
24 changes: 6 additions & 18 deletions src/Command/AddProductReviewBySlug.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,34 +6,22 @@

final class AddProductReviewBySlug
{
/**
* @var string
*/
/** @var string */
private $productSlug;

/**
* @var string
*/
/** @var string */
private $channelCode;

/**
* @var string
*/
/** @var string */
private $title;

/**
* @var int
*/
/** @var int */
private $rating;

/**
* @var string
*/
/** @var string */
private $comment;

/**
* @var string
*/
/** @var string */
private $email;

public function __construct(string $productSlug, string $channelCode, string $title, int $rating, string $comment, string $email)
Expand Down
26 changes: 3 additions & 23 deletions src/Command/AddressOrder.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,52 +8,32 @@

final class AddressOrder
{
/**
* @var string
*/
/** @var string */
private $orderToken;

/**
* @var Address
*/
/** @var Address */
private $address;

/**
* @var Address
*/
/** @var Address */
private $billingAddress;

/**
* @param string $orderToken
* @param Address $shippingAddress
* @param Address $billingAddress
*/
public function __construct(string $orderToken, Address $shippingAddress, Address $billingAddress)
{
$this->orderToken = $orderToken;
$this->address = $shippingAddress;
$this->billingAddress = $billingAddress;
}

/**
* @return string
*/
public function orderToken(): string
{
return $this->orderToken;
}

/**
* @return Address
*/
public function shippingAddress(): Address
{
return $this->address;
}

/**
* @return Address
*/
public function billingAddress(): Address
{
return $this->billingAddress;
Expand Down
26 changes: 3 additions & 23 deletions src/Command/ChangeItemQuantity.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,15 @@

final class ChangeItemQuantity
{
/**
* @var string
*/
/** @var string */
private $orderToken;

/**
* @var mixed
*/
/** @var mixed */
private $itemIdentifier;

/**
* @var int
*/
/** @var int */
private $quantity;

/**
* @param string $orderToken
* @param mixed $itemIdentifier
* @param int $quantity
*/
public function __construct(string $orderToken, $itemIdentifier, int $quantity)
{
Assert::greaterThan($quantity, 0, 'Quantity should be greater than 0');
Expand All @@ -37,25 +26,16 @@ public function __construct(string $orderToken, $itemIdentifier, int $quantity)
$this->quantity = $quantity;
}

/**
* @return string
*/
public function orderToken(): string
{
return $this->orderToken;
}

/**
* @return mixed
*/
public function itemIdentifier()
{
return $this->itemIdentifier;
}

/**
* @return int
*/
public function quantity(): int
{
return $this->quantity;
Expand Down
26 changes: 3 additions & 23 deletions src/Command/ChoosePaymentMethod.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,52 +6,32 @@

final class ChoosePaymentMethod
{
/**
* @var mixed
*/
/** @var mixed */
private $paymentIdentifier;

/**
* @var string
*/
/** @var string */
private $paymentMethod;

/**
* @var string
*/
/** @var string */
private $orderToken;

/**
* @param string $orderToken
* @param mixed $paymentIdentifier
* @param string $paymentMethod
*/
public function __construct(string $orderToken, $paymentIdentifier, string $paymentMethod)
{
$this->orderToken = $orderToken;
$this->paymentIdentifier = $paymentIdentifier;
$this->paymentMethod = $paymentMethod;
}

/**
* @return string
*/
public function orderToken(): string
{
return $this->orderToken;
}

/**
* @return mixed
*/
public function paymentIdentifier()
{
return $this->paymentIdentifier;
}

/**
* @return string
*/
public function paymentMethod(): string
{
return $this->paymentMethod;
Expand Down
26 changes: 3 additions & 23 deletions src/Command/ChooseShippingMethod.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,52 +6,32 @@

final class ChooseShippingMethod
{
/**
* @var mixed
*/
/** @var mixed */
private $shipmentIdentifier;

/**
* @var string
*/
/** @var string */
private $shippingMethod;

/**
* @var string
*/
/** @var string */
private $orderToken;

/**
* @param string $orderToken
* @param mixed $shipmentIdentifier
* @param string $shippingMethod
*/
public function __construct(string $orderToken, $shipmentIdentifier, string $shippingMethod)
{
$this->orderToken = $orderToken;
$this->shipmentIdentifier = $shipmentIdentifier;
$this->shippingMethod = $shippingMethod;
}

/**
* @return string
*/
public function orderToken(): string
{
return $this->orderToken;
}

/**
* @return mixed
*/
public function shipmentIdentifier()
{
return $this->shipmentIdentifier;
}

/**
* @return string
*/
public function shippingMethod(): string
{
return $this->shippingMethod;
Expand Down
Loading