Skip to content
Snippets Groups Projects
Commit d597d235 authored by Andy Summers's avatar Andy Summers
Browse files

Allow `null` for optional parameters

parent 8ae792c2
No related branches found
No related tags found
1 merge request!79Allow `null` for optional parameters
...@@ -187,9 +187,9 @@ class OrderHeader extends MagentoOrder ...@@ -187,9 +187,9 @@ class OrderHeader extends MagentoOrder
} }
/** /**
* @return string * @return string|null
*/ */
public function getCustomerReferenceField(): string public function getCustomerReferenceField()
{ {
return $this->customerReferenceField; return $this->customerReferenceField;
} }
...@@ -198,7 +198,7 @@ class OrderHeader extends MagentoOrder ...@@ -198,7 +198,7 @@ class OrderHeader extends MagentoOrder
* @param string $customerReferenceField * @param string $customerReferenceField
* @return OrderHeader * @return OrderHeader
*/ */
public function setCustomerReferenceField(string $customerReferenceField): OrderHeader public function setCustomerReferenceField(string $customerReferenceField = null): OrderHeader
{ {
$this->customerReferenceField = $customerReferenceField; $this->customerReferenceField = $customerReferenceField;
return $this; return $this;
...@@ -223,9 +223,9 @@ class OrderHeader extends MagentoOrder ...@@ -223,9 +223,9 @@ class OrderHeader extends MagentoOrder
} }
/** /**
* @return string * @return string|null
*/ */
public function getInterfaceTypeFlag(): string public function getInterfaceTypeFlag()
{ {
return $this->interfaceTypeFlag; return $this->interfaceTypeFlag;
} }
...@@ -234,16 +234,16 @@ class OrderHeader extends MagentoOrder ...@@ -234,16 +234,16 @@ class OrderHeader extends MagentoOrder
* @param string $interfaceTypeFlag * @param string $interfaceTypeFlag
* @return OrderHeader * @return OrderHeader
*/ */
public function setInterfaceTypeFlag(string $interfaceTypeFlag): OrderHeader public function setInterfaceTypeFlag(string $interfaceTypeFlag = null): OrderHeader
{ {
$this->interfaceTypeFlag = $interfaceTypeFlag; $this->interfaceTypeFlag = $interfaceTypeFlag;
return $this; return $this;
} }
/** /**
* @return string * @return string|null
*/ */
public function getDefaultSet(): string public function getDefaultSet()
{ {
return $this->defaultSet; return $this->defaultSet;
} }
...@@ -252,16 +252,16 @@ class OrderHeader extends MagentoOrder ...@@ -252,16 +252,16 @@ class OrderHeader extends MagentoOrder
* @param string $defaultSet * @param string $defaultSet
* @return OrderHeader * @return OrderHeader
*/ */
public function setDefaultSet(string $defaultSet): OrderHeader public function setDefaultSet(string $defaultSet = null): OrderHeader
{ {
$this->defaultSet = $defaultSet; $this->defaultSet = $defaultSet;
return $this; return $this;
} }
/** /**
* @return string * @return string|null
*/ */
public function getTestMode(): string public function getTestMode()
{ {
return $this->testMode; return $this->testMode;
} }
...@@ -270,7 +270,7 @@ class OrderHeader extends MagentoOrder ...@@ -270,7 +270,7 @@ class OrderHeader extends MagentoOrder
* @param string $testMode * @param string $testMode
* @return OrderHeader * @return OrderHeader
*/ */
public function setTestMode(string $testMode): OrderHeader public function setTestMode(string $testMode = null): OrderHeader
{ {
$this->testMode = $testMode; $this->testMode = $testMode;
return $this; return $this;
......
...@@ -257,9 +257,9 @@ class OrderLine extends MagentoOrder ...@@ -257,9 +257,9 @@ class OrderLine extends MagentoOrder
} }
/** /**
* @return float * @return float|null
*/ */
public function getBundleId(): float public function getBundleId()
{ {
return $this->bundleId; return $this->bundleId;
} }
...@@ -268,16 +268,16 @@ class OrderLine extends MagentoOrder ...@@ -268,16 +268,16 @@ class OrderLine extends MagentoOrder
* @param float $bundleId * @param float $bundleId
* @return OrderLine * @return OrderLine
*/ */
public function setBundleId(float $bundleId): OrderLine public function setBundleId(float $bundleId = null): OrderLine
{ {
$this->bundleId = $bundleId; $this->bundleId = $bundleId;
return $this; return $this;
} }
/** /**
* @return float * @return float|null
*/ */
public function getBundleLineId(): float public function getBundleLineId()
{ {
return $this->bundleLineId; return $this->bundleLineId;
} }
...@@ -286,7 +286,7 @@ class OrderLine extends MagentoOrder ...@@ -286,7 +286,7 @@ class OrderLine extends MagentoOrder
* @param float $bundleLineId * @param float $bundleLineId
* @return OrderLine * @return OrderLine
*/ */
public function setBundleLineId(float $bundleLineId): OrderLine public function setBundleLineId(float $bundleLineId = null): OrderLine
{ {
$this->bundleLineId = $bundleLineId; $this->bundleLineId = $bundleLineId;
return $this; return $this;
...@@ -383,9 +383,9 @@ class OrderLine extends MagentoOrder ...@@ -383,9 +383,9 @@ class OrderLine extends MagentoOrder
} }
/** /**
* @return string * @return string|null
*/ */
public function getShipToAddress2(): string public function getShipToAddress2()
{ {
return $this->shipToAddress2; return $this->shipToAddress2;
} }
...@@ -394,16 +394,16 @@ class OrderLine extends MagentoOrder ...@@ -394,16 +394,16 @@ class OrderLine extends MagentoOrder
* @param string $shipToAddress2 * @param string $shipToAddress2
* @return OrderLine * @return OrderLine
*/ */
public function setShipToAddress2(string $shipToAddress2): OrderLine public function setShipToAddress2(string $shipToAddress2 = null): OrderLine
{ {
$this->shipToAddress2 = $shipToAddress2; $this->shipToAddress2 = $shipToAddress2;
return $this; return $this;
} }
/** /**
* @return string * @return string|null
*/ */
public function getShipToAddress3(): string public function getShipToAddress3()
{ {
return $this->shipToAddress3; return $this->shipToAddress3;
} }
...@@ -412,16 +412,16 @@ class OrderLine extends MagentoOrder ...@@ -412,16 +412,16 @@ class OrderLine extends MagentoOrder
* @param string $shipToAddress3 * @param string $shipToAddress3
* @return OrderLine * @return OrderLine
*/ */
public function setShipToAddress3(string $shipToAddress3): OrderLine public function setShipToAddress3(string $shipToAddress3 = null): OrderLine
{ {
$this->shipToAddress3 = $shipToAddress3; $this->shipToAddress3 = $shipToAddress3;
return $this; return $this;
} }
/** /**
* @return string * @return string|null
*/ */
public function getShipToAddress4(): string public function getShipToAddress4()
{ {
return $this->shipToAddress4; return $this->shipToAddress4;
} }
...@@ -430,7 +430,7 @@ class OrderLine extends MagentoOrder ...@@ -430,7 +430,7 @@ class OrderLine extends MagentoOrder
* @param string $shipToAddress4 * @param string $shipToAddress4
* @return OrderLine * @return OrderLine
*/ */
public function setShipToAddress4(string $shipToAddress4): OrderLine public function setShipToAddress4(string $shipToAddress4 = null): OrderLine
{ {
$this->shipToAddress4 = $shipToAddress4; $this->shipToAddress4 = $shipToAddress4;
return $this; return $this;
...@@ -491,9 +491,9 @@ class OrderLine extends MagentoOrder ...@@ -491,9 +491,9 @@ class OrderLine extends MagentoOrder
} }
/** /**
* @return string * @return string|null
*/ */
public function getShippingInstructions(): string public function getShippingInstructions()
{ {
return $this->shippingInstructions; return $this->shippingInstructions;
} }
...@@ -502,16 +502,16 @@ class OrderLine extends MagentoOrder ...@@ -502,16 +502,16 @@ class OrderLine extends MagentoOrder
* @param string $shippingInstructions * @param string $shippingInstructions
* @return OrderLine * @return OrderLine
*/ */
public function setShippingInstructions(string $shippingInstructions): OrderLine public function setShippingInstructions(string $shippingInstructions = null): OrderLine
{ {
$this->shippingInstructions = $shippingInstructions; $this->shippingInstructions = $shippingInstructions;
return $this; return $this;
} }
/** /**
* @return float * @return float|null
*/ */
public function getShipSetId(): float public function getShipSetId()
{ {
return $this->shipSetId; return $this->shipSetId;
} }
...@@ -520,16 +520,16 @@ class OrderLine extends MagentoOrder ...@@ -520,16 +520,16 @@ class OrderLine extends MagentoOrder
* @param float $shipSetId * @param float $shipSetId
* @return OrderLine * @return OrderLine
*/ */
public function setShipSetId(float $shipSetId): OrderLine public function setShipSetId(float $shipSetId = null): OrderLine
{ {
$this->shipSetId = $shipSetId; $this->shipSetId = $shipSetId;
return $this; return $this;
} }
/** /**
* @return float * @return float|null
*/ */
public function getUserId(): float public function getUserId()
{ {
return $this->userId; return $this->userId;
} }
...@@ -538,16 +538,16 @@ class OrderLine extends MagentoOrder ...@@ -538,16 +538,16 @@ class OrderLine extends MagentoOrder
* @param float $userId * @param float $userId
* @return OrderLine * @return OrderLine
*/ */
public function setUserId(float $userId): OrderLine public function setUserId(float $userId = null): OrderLine
{ {
$this->userId = $userId; $this->userId = $userId;
return $this; return $this;
} }
/** /**
* @return string * @return string|null
*/ */
public function getTestMode(): string public function getTestMode()
{ {
return $this->testMode; return $this->testMode;
} }
...@@ -556,16 +556,16 @@ class OrderLine extends MagentoOrder ...@@ -556,16 +556,16 @@ class OrderLine extends MagentoOrder
* @param string $testMode * @param string $testMode
* @return OrderLine * @return OrderLine
*/ */
public function setTestMode(string $testMode): OrderLine public function setTestMode(string $testMode = null): OrderLine
{ {
$this->testMode = $testMode; $this->testMode = $testMode;
return $this; return $this;
} }
/** /**
* @return Money * @return Money|null
*/ */
public function getUnitPromoPrice(): Money public function getUnitPromoPrice()
{ {
return $this->unitPromoPrice; return $this->unitPromoPrice;
} }
...@@ -574,16 +574,16 @@ class OrderLine extends MagentoOrder ...@@ -574,16 +574,16 @@ class OrderLine extends MagentoOrder
* @param Money $unitPromoPrice * @param Money $unitPromoPrice
* @return OrderLine * @return OrderLine
*/ */
public function setUnitPromoPrice(Money $unitPromoPrice): OrderLine public function setUnitPromoPrice(Money $unitPromoPrice = null): OrderLine
{ {
$this->unitPromoPrice = $unitPromoPrice; $this->unitPromoPrice = $unitPromoPrice;
return $this; return $this;
} }
/** /**
* @return string * @return string|null
*/ */
public function getPromoDiscountName(): string public function getPromoDiscountName()
{ {
return $this->promoDiscountName; return $this->promoDiscountName;
} }
...@@ -592,7 +592,7 @@ class OrderLine extends MagentoOrder ...@@ -592,7 +592,7 @@ class OrderLine extends MagentoOrder
* @param string $promoDiscountName * @param string $promoDiscountName
* @return OrderLine * @return OrderLine
*/ */
public function setPromoDiscountName(string $promoDiscountName): OrderLine public function setPromoDiscountName(string $promoDiscountName = null): OrderLine
{ {
$this->promoDiscountName = $promoDiscountName; $this->promoDiscountName = $promoDiscountName;
return $this; return $this;
......
...@@ -267,18 +267,18 @@ class OrderPayment extends MagentoOrder ...@@ -267,18 +267,18 @@ class OrderPayment extends MagentoOrder
} }
/** /**
* @return string * @return string|null
*/ */
public function getTestMode(): string public function getTestMode()
{ {
return $this->testMode; return $this->testMode;
} }
/** /**
* @param string $testMode * @param string|null $testMode
* @return OrderPayment * @return OrderPayment
*/ */
public function setTestMode(string $testMode): OrderPayment public function setTestMode(string $testMode = null): OrderPayment
{ {
$this->testMode = $testMode; $this->testMode = $testMode;
return $this; return $this;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment