Skip to content

Commit

Permalink
Fix PSR2 styling
Browse files Browse the repository at this point in the history
  • Loading branch information
Soneritics committed Nov 10, 2020
1 parent 1274cb5 commit 45f8408
Show file tree
Hide file tree
Showing 8 changed files with 217 additions and 207 deletions.
18 changes: 9 additions & 9 deletions Soneritics/PostNL/API.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,13 +136,13 @@ public function getShippingStatusService(): ShippingStatusService
return new ShippingStatusService($this->apiKey, $this->customer, $this->endpoints->ShippingStatus);
}

/**
* Get the address service
*
* @return AddressService
*/
public function getAddressService(): AddressService
{
return new AddressService($this->apiKey, $this->customer, $this->endpoints->Address);
}
/**
* Get the address service
*
* @return AddressService
*/
public function getAddressService(): AddressService
{
return new AddressService($this->apiKey, $this->customer, $this->endpoints->Address);
}
}
6 changes: 3 additions & 3 deletions Soneritics/PostNL/Endpoints/Endpoints.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ abstract class Endpoints
*/
public $ShippingStatus;

/**
* @var string
*/
/**
* @var string
*/
public $Address;

/**
Expand Down
2 changes: 1 addition & 1 deletion Soneritics/PostNL/Endpoints/Sandbox.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,5 @@ class Sandbox extends Endpoints
public $Locations = 'https://api-sandbox.postnl.nl/shipment/v2_1/locations';
public $PostalCode = 'https://api-sandbox.postnl.nl/shipment/checkout/v1';
public $ShippingStatus = 'https://api-sandbox.postnl.nl/shipment/v2/status';
public $Address = 'https://api.postnl.nl/address'; // No sandbox available
public $Address = 'https://api.postnl.nl/address'; // No sandbox available
}
144 changes: 72 additions & 72 deletions Soneritics/PostNL/Model/Amount.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,84 +31,84 @@
*/
class Amount extends AutoJsonSerializer
{
/**
* Mandatory
*
* @var string
*/
protected $AmountType;
/**
* Mandatory
*
* @var string
*/
protected $AmountType;

/**
* Mandatory
*
* @var string
*/
protected $Currency;
/**
* Mandatory
*
* @var string
*/
protected $Currency;

/**
* Mandatory
*
* @var string
*/
protected $Value;
/**
* Mandatory
*
* @var string
*/
protected $Value;

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

/**
*
* @param string $AmountType
* @return Amount
*/
public function setAmountType(string $AmountType): Amount
{
$this->AmountType = $AmountType;
return $this;
}
/**
*
* @param string $AmountType
* @return Amount
*/
public function setAmountType(string $AmountType): Amount
{
$this->AmountType = $AmountType;
return $this;
}

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

/**
*
* @param string $Currency
* @return Amount
*/
public function setCurrency(string $Currency): Amount
{
$this->Currency = $Currency;
return $this;
}
/**
*
* @param string $Currency
* @return Amount
*/
public function setCurrency(string $Currency): Amount
{
$this->Currency = $Currency;
return $this;
}

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

/**
*
* @param string $Value
* @return Amount
*/
public function setValue(string $Value): Amount
{
$this->Value = $Value;
return $this;
}
/**
*
* @param string $Value
* @return Amount
*/
public function setValue(string $Value): Amount
{
$this->Value = $Value;
return $this;
}
}
122 changes: 61 additions & 61 deletions Soneritics/PostNL/Model/Amounts.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,70 +29,70 @@
*/
class Amounts implements \Serializable, \JsonSerializable
{
/**
*
* @var array
*/
protected $amounts = [];
/**
*
* @var array
*/
protected $amounts = [];

/**
* Add an amount
*
* @param Amount $amount
* @return $this
*/
public function addAmount(Amount $amount)
{
$this->amounts[] = $amount;
return $this;
}
/**
* Add an amount
*
* @param Amount $amount
* @return $this
*/
public function addAmount(Amount $amount)
{
$this->amounts[] = $amount;
return $this;
}

/**
*
* @return array
*/
public function getAmounts()
{
return $this->amounts;
}
/**
*
* @return array
*/
public function getAmounts()
{
return $this->amounts;
}

/**
* String representation of object
*
* @link http://php.net/manual/en/serializable.serialize.php
* @return string the string representation of the object or null
* @since 5.1.0
*/
public function serialize()
{
return serialize($this->amounts);
}
/**
* String representation of object
*
* @link http://php.net/manual/en/serializable.serialize.php
* @return string the string representation of the object or null
* @since 5.1.0
*/
public function serialize()
{
return serialize($this->amounts);
}

/**
* Constructs the object
*
* @link http://php.net/manual/en/serializable.unserialize.php
* @param string $serialized <p>
* The string representation of the object.
* </p>
* @return void
* @since 5.1.0
*/
public function unserialize($serialized)
{
$this->amounts = unserialize($serialized);
}
/**
* Constructs the object
*
* @link http://php.net/manual/en/serializable.unserialize.php
* @param string $serialized <p>
* The string representation of the object.
* </p>
* @return void
* @since 5.1.0
*/
public function unserialize($serialized)
{
$this->amounts = unserialize($serialized);
}

/**
* Specify data which should be serialized to JSON
*
* @link http://php.net/manual/en/jsonserializable.jsonserialize.php
* @return mixed data which can be serialized by <b>json_encode</b>,
* which is a value of any type other than a resource.
* @since 5.4.0
*/
public function jsonSerialize()
{
return $this->amounts;
}
/**
* Specify data which should be serialized to JSON
*
* @link http://php.net/manual/en/jsonserializable.jsonserialize.php
* @return mixed data which can be serialized by <b>json_encode</b>,
* which is a value of any type other than a resource.
* @since 5.4.0
*/
public function jsonSerialize()
{
return $this->amounts;
}
}
40 changes: 20 additions & 20 deletions Soneritics/PostNL/Model/Shipment.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ class Shipment extends AutoJsonSerializer
*/
protected $Addresses;

/**
* Used for example in label: 3087 Extra Cover
* @var
*/
/**
* Used for example in label: 3087 Extra Cover
* @var
*/
protected $Amounts;

/**
Expand Down Expand Up @@ -231,23 +231,23 @@ public function setAddresses(Addresses $Addresses): Shipment
return $this;
}

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

/**
* @param Amounts $Amounts
* @return $this
*/
public function setAmounts(Amounts $Amounts) : Shipment
{
$this->Amounts = $Amounts;
return $this;
}
{
return $this->Amounts;
}

/**
* @param Amounts $Amounts
* @return $this
*/
public function setAmounts(Amounts $Amounts) : Shipment
{
$this->Amounts = $Amounts;
return $this;
}

/**
*
Expand Down
Loading

0 comments on commit 45f8408

Please sign in to comment.