@@ -4,7 +4,7 @@ |
||
| 4 | 4 | |
| 5 | 5 | abstract class EntityCollection extends \ArrayObject |
| 6 | 6 | { |
| 7 | - public function toArray() |
|
| 7 | + public function toArray () |
|
| 8 | 8 | { |
| 9 | 9 | $ret = []; |
| 10 | 10 | /** @var Entity $entity */ |
@@ -24,7 +24,7 @@ |
||
| 24 | 24 | mayHaveAsArray as public getMessages; |
| 25 | 25 | } |
| 26 | 26 | |
| 27 | - public function getIsResidential() |
|
| 27 | + public function getIsResidential () |
|
| 28 | 28 | { |
| 29 | 29 | $is_residential = $this->attributes->mayHave('is_residential')->value(); |
| 30 | 30 | if ($is_residential === null) { |
@@ -4,7 +4,6 @@ |
||
| 4 | 4 | |
| 5 | 5 | use ShippoClient\Entity\Parcel; |
| 6 | 6 | use ShippoClient\Entity\ParcelCollection; |
| 7 | -use TurmericSpice\Container; |
|
| 8 | 7 | |
| 9 | 8 | class ParcelList extends ListResponse |
| 10 | 9 | { |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | * |
| 30 | 30 | * @return string |
| 31 | 31 | */ |
| 32 | - public function getObjectStatus() |
|
| 32 | + public function getObjectStatus () |
|
| 33 | 33 | { |
| 34 | 34 | return $this->attributes->mayHave('object_status')->asString(); |
| 35 | 35 | } |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | * |
| 40 | 40 | * @return bool |
| 41 | 41 | */ |
| 42 | - public function getWasTest() |
|
| 42 | + public function getWasTest () |
|
| 43 | 43 | { |
| 44 | 44 | return $this->attributes->mayHave('was_test')->asBoolean(); |
| 45 | 45 | } |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | * |
| 50 | 50 | * @return string |
| 51 | 51 | */ |
| 52 | - public function getRate() |
|
| 52 | + public function getRate () |
|
| 53 | 53 | { |
| 54 | 54 | return $this->attributes->mayHave('rate')->asString(); |
| 55 | 55 | } |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | /** |
| 58 | 58 | * @return mixed|null |
| 59 | 59 | */ |
| 60 | - public function getPickupDate() |
|
| 60 | + public function getPickupDate () |
|
| 61 | 61 | { |
| 62 | 62 | return $this->attributes->mayHave('pickup_date')->value(); |
| 63 | 63 | } |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | * |
| 69 | 69 | * @return string |
| 70 | 70 | */ |
| 71 | - public function getTrackingNumber() |
|
| 71 | + public function getTrackingNumber () |
|
| 72 | 72 | { |
| 73 | 73 | return $this->attributes->mayHave('tracking_number')->asString(); |
| 74 | 74 | } |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | * |
| 79 | 79 | * @return TrackingStatus |
| 80 | 80 | */ |
| 81 | - public function getTrackingStatus() |
|
| 81 | + public function getTrackingStatus () |
|
| 82 | 82 | { |
| 83 | 83 | return new TrackingStatus($this->attributes->mayHave('tracking_status')->asArray()); |
| 84 | 84 | } |
@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | /** |
| 87 | 87 | * @return TrackingHistory |
| 88 | 88 | */ |
| 89 | - public function getTrackingHistory() |
|
| 89 | + public function getTrackingHistory () |
|
| 90 | 90 | { |
| 91 | 91 | $entities = $this->attributes->mayHave('tracking_history') |
| 92 | 92 | ->asInstanceArray('ShippoClient\\Entity\\TrackingStatus'); |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | * |
| 101 | 101 | * @return string |
| 102 | 102 | */ |
| 103 | - public function getTrackingUrlProvider() |
|
| 103 | + public function getTrackingUrlProvider () |
|
| 104 | 104 | { |
| 105 | 105 | return $this->attributes->mayHave('tracking_url_provider')->asString(); |
| 106 | 106 | } |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | * |
| 112 | 112 | * @return string |
| 113 | 113 | */ |
| 114 | - public function getLabelUrl() |
|
| 114 | + public function getLabelUrl () |
|
| 115 | 115 | { |
| 116 | 116 | return $this->attributes->mayHave('label_url')->asString(); |
| 117 | 117 | } |
@@ -122,7 +122,7 @@ discard block |
||
| 122 | 122 | * |
| 123 | 123 | * @return string |
| 124 | 124 | */ |
| 125 | - public function getCommercialInvoiceUrl() |
|
| 125 | + public function getCommercialInvoiceUrl () |
|
| 126 | 126 | { |
| 127 | 127 | return $this->attributes->mayHave('commercial_invoice_url')->asString(); |
| 128 | 128 | } |
@@ -134,7 +134,7 @@ discard block |
||
| 134 | 134 | * |
| 135 | 135 | * @return array |
| 136 | 136 | */ |
| 137 | - public function getMessages() |
|
| 137 | + public function getMessages () |
|
| 138 | 138 | { |
| 139 | 139 | return $this->attributes->mayHave('messages')->asArray(); |
| 140 | 140 | } |
@@ -142,7 +142,7 @@ discard block |
||
| 142 | 142 | /** |
| 143 | 143 | * @return mixed|null |
| 144 | 144 | */ |
| 145 | - public function getOrder() |
|
| 145 | + public function getOrder () |
|
| 146 | 146 | { |
| 147 | 147 | return $this->attributes->mayHave('order')->value(); |
| 148 | 148 | } |
@@ -150,12 +150,12 @@ discard block |
||
| 150 | 150 | /** |
| 151 | 151 | * @return string |
| 152 | 152 | */ |
| 153 | - public function getMetadata() |
|
| 153 | + public function getMetadata () |
|
| 154 | 154 | { |
| 155 | 155 | return $this->attributes->mayHave('metadata')->asString(); |
| 156 | 156 | } |
| 157 | 157 | |
| 158 | - public function toArray() |
|
| 158 | + public function toArray () |
|
| 159 | 159 | { |
| 160 | 160 | $array = $this->__toArray(); |
| 161 | 161 | $array['tracking_status'] = $this->getTrackingStatus()->toArray(); |
@@ -4,7 +4,6 @@ |
||
| 4 | 4 | |
| 5 | 5 | use ShippoClient\Entity\Parcel; |
| 6 | 6 | use ShippoClient\Entity\ParcelCollection; |
| 7 | -use TurmericSpice\Container; |
|
| 8 | 7 | |
| 9 | 8 | class ParcelList extends ListResponse |
| 10 | 9 | { |
@@ -7,7 +7,7 @@ |
||
| 7 | 7 | /** |
| 8 | 8 | * @param Address[] $entities |
| 9 | 9 | */ |
| 10 | - public function __construct(array $entities) |
|
| 10 | + public function __construct (array $entities) |
|
| 11 | 11 | { |
| 12 | 12 | parent::__construct($entities); |
| 13 | 13 | } |
@@ -4,7 +4,6 @@ |
||
| 4 | 4 | |
| 5 | 5 | use ShippoClient\Entity\Parcel; |
| 6 | 6 | use ShippoClient\Entity\ParcelCollection; |
| 7 | -use TurmericSpice\Container; |
|
| 8 | 7 | |
| 9 | 8 | class ParcelList extends ListResponse |
| 10 | 9 | { |
@@ -10,7 +10,7 @@ |
||
| 10 | 10 | /** |
| 11 | 11 | * @return RefundCollection |
| 12 | 12 | */ |
| 13 | - public function getResults() |
|
| 13 | + public function getResults () |
|
| 14 | 14 | { |
| 15 | 15 | $entities = []; |
| 16 | 16 | foreach ($this->attributes->mayHave('results')->asArray() as $attributes) { |
@@ -7,7 +7,7 @@ |
||
| 7 | 7 | /** |
| 8 | 8 | * @param Address[] $entities |
| 9 | 9 | */ |
| 10 | - public function __construct(array $entities) |
|
| 10 | + public function __construct (array $entities) |
|
| 11 | 11 | { |
| 12 | 12 | parent::__construct($entities); |
| 13 | 13 | } |
@@ -7,7 +7,7 @@ |
||
| 7 | 7 | /** |
| 8 | 8 | * @param Address[] $entities |
| 9 | 9 | */ |
| 10 | - public function __construct(array $entities) |
|
| 10 | + public function __construct (array $entities) |
|
| 11 | 11 | { |
| 12 | 12 | parent::__construct($entities); |
| 13 | 13 | } |
@@ -7,7 +7,7 @@ |
||
| 7 | 7 | /** |
| 8 | 8 | * @param Address[] $entities |
| 9 | 9 | */ |
| 10 | - public function __construct(array $entities) |
|
| 10 | + public function __construct (array $entities) |
|
| 11 | 11 | { |
| 12 | 12 | parent::__construct($entities); |
| 13 | 13 | } |
@@ -7,7 +7,7 @@ |
||
| 7 | 7 | /** |
| 8 | 8 | * @param Address[] $entities |
| 9 | 9 | */ |
| 10 | - public function __construct(array $entities) |
|
| 10 | + public function __construct (array $entities) |
|
| 11 | 11 | { |
| 12 | 12 | parent::__construct($entities); |
| 13 | 13 | } |