Completed
Branch master (bb6fa5)
by Sean
04:19
created
src/Requests/Label.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
      * @param string $size
38 38
      * @return $this
39 39
      */
40
-    public function paper_size($size="default")
40
+    public function paper_size($size = "default")
41 41
     {
42 42
         $this->paper_size = $size;
43 43
         return $this;
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
      * @param bool $value
58 58
      * @return $this
59 59
      */
60
-    public function is_document($value=true)
60
+    public function is_document($value = true)
61 61
     {
62 62
         if ($value == true) {
63 63
             $$this->is_document = true;
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
      * @param bool $value
108 108
      * @return $this
109 109
      */
110
-    public function return_shipment($value=true)
110
+    public function return_shipment($value = true)
111 111
     {
112 112
         if ($value == true) {
113 113
             $$this->return_shipment = true;
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
      */
134 134
     public function COD(Money $money)
135 135
     {
136
-        if ($this->service_options == null){
136
+        if ($this->service_options == null) {
137 137
             $this->service_options = array();
138 138
         }
139 139
         $option = new \stdClass();
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
      * @param Invoice $invoice
148 148
      * @return $this
149 149
      */
150
-    public function invoice(Invoice $invoice){
150
+    public function invoice(Invoice $invoice) {
151 151
         $this->invoice = $invoice;
152 152
         return $this;
153 153
     }
@@ -156,12 +156,12 @@  discard block
 block discarded – undo
156 156
      * @param array $references
157 157
      * @return $this
158 158
      */
159
-    public function references(array $references){
159
+    public function references(array $references) {
160 160
         $this->references = $references;
161 161
         return $this;
162 162
     }
163 163
 
164
-    public function billing(Billing $billing){
164
+    public function billing(Billing $billing) {
165 165
         $this->billing = $billing;
166 166
         return $this;
167 167
     }
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
      * @param Customs $customs
171 171
      * @return $this
172 172
      */
173
-    public function customs(Customs $customs){
173
+    public function customs(Customs $customs) {
174 174
         $this->customs = $customs;
175 175
         return $this;
176 176
     }
Please login to merge, or discard this patch.
src/Models/Invoice.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
      * @param string $value
20 20
      * @return $this
21 21
      */
22
-    public function number($value){
22
+    public function number($value) {
23 23
         $this->number = strval($value);
24 24
         return $this;
25 25
     }
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
      * @param string $value
29 29
      * @return $this
30 30
      */
31
-    public function type($value){
31
+    public function type($value) {
32 32
         $this->type = strval($value);
33 33
         return $this;
34 34
     }
@@ -38,8 +38,8 @@  discard block
 block discarded – undo
38 38
      * @return $this
39 39
      * @throws \Exception
40 40
      */
41
-    public function number_of_copies($value){
42
-        if ($value >= 1 && $value <= 4 )
41
+    public function number_of_copies($value) {
42
+        if ($value >= 1 && $value <= 4)
43 43
         {$this->number_of_copies = $value; }
44 44
         else {
45 45
             $error = "Number of copies must be between 1 and 4";
Please login to merge, or discard this patch.
src/Models/PaymentMethod.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
      * @param string $value
14 14
      * @return $this
15 15
      */
16
-    public function account_number($value){
16
+    public function account_number($value) {
17 17
         $this->account_number = strval($value);
18 18
         return $this;
19 19
     }
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
      * @param string $value
23 23
      * @return $this
24 24
      */
25
-    public function postal_code($value){
25
+    public function postal_code($value) {
26 26
         $this->postal_code = strval($value);
27 27
         return $this;
28 28
     }
Please login to merge, or discard this patch.
src/Models/Parcel.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
      * @return $this
16 16
      */
17 17
     public function box_type($value) {
18
-        $this->box_type = strval($value);;
18
+        $this->box_type = strval($value); ;
19 19
         return $this;
20 20
     }
21 21
 
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
      * @param Dimension $dimension
24 24
      * @return $this
25 25
      */
26
-    public function dimension(Dimension $dimension){
26
+    public function dimension(Dimension $dimension) {
27 27
         $this->dimension = $dimension;
28 28
         return $this;
29 29
     }
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
      * @param $value
42 42
      * @return $this
43 43
      */
44
-    public function description($value){
44
+    public function description($value) {
45 45
         $this->description = strval($value);
46 46
         return $this;
47 47
     }
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
      * @param Weight $weight
51 51
      * @return $this
52 52
      */
53
-    public function weight(Weight $weight){
53
+    public function weight(Weight $weight) {
54 54
         $this->weight = $weight;
55 55
         return $this;
56 56
     }
Please login to merge, or discard this patch.
src/Models/Customs.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -17,9 +17,9 @@  discard block
 block discarded – undo
17 17
      * @return $this
18 18
      * @throws \Exception
19 19
      */
20
-    public function purpose($value){
20
+    public function purpose($value) {
21 21
         $purposes = array('gift', 'merchandise', 'sample', 'return', 'repair');
22
-        if(in_array($value, $purposes)){
22
+        if (in_array($value, $purposes)) {
23 23
             $this->purpose = $value;
24 24
         } else {
25 25
             $error = "Purpose must be gift, merchandise, sample, return, or repair";
@@ -33,9 +33,9 @@  discard block
 block discarded – undo
33 33
      * @return $this
34 34
      * @throws \Exception
35 35
      */
36
-    public function terms_of_trade($value){
37
-        $terms = array('dat','ddu','ddp','dap');
38
-        if(in_array($value, $terms)){
36
+    public function terms_of_trade($value) {
37
+        $terms = array('dat', 'ddu', 'ddp', 'dap');
38
+        if (in_array($value, $terms)) {
39 39
             $this->terms_of_trade = $value;
40 40
         } else {
41 41
             $error = "Terms must be dat, ddu, ddp, or dap";
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
      * @param no_eei $value
49 49
      * @return $this
50 50
      */
51
-    public function no_eei(no_eei $value){
51
+    public function no_eei(no_eei $value) {
52 52
         $this->eei = $value;
53 53
         return $this;
54 54
     }
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
      * @param aes $value
58 58
      * @return $this
59 59
      */
60
-    public function aes(aes $value){
60
+    public function aes(aes $value) {
61 61
         $this->eei = $value;
62 62
         return $this;
63 63
     }
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
      * @param CustomsBilling $value
67 67
      * @return $this
68 68
      */
69
-    public function customs_billing(CustomsBilling $value){
69
+    public function customs_billing(CustomsBilling $value) {
70 70
         $this->billing = $value;
71 71
         return $this;
72 72
     }
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
      * @param Address $value
76 76
      * @return $this
77 77
      */
78
-    public function importer_address(Address $value){
78
+    public function importer_address(Address $value) {
79 79
         $this->importer_address = $value;
80 80
         return $this;
81 81
     }
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
      * @param Passport $value
85 85
      * @return $this
86 86
      */
87
-    public function passport(Passport $value){
87
+    public function passport(Passport $value) {
88 88
         $this->passport = $value;
89 89
         return $this;
90 90
     }
Please login to merge, or discard this patch.
src/Models/Model.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -4,19 +4,19 @@
 block discarded – undo
4 4
 
5 5
 class Model
6 6
 {
7
-    protected $acceptedCountries = array('ABW','AFG','AGO','AIA','ALA','ALB','AND','ARE','ARG','ARM','ASM','ATA','ATF','ATG','AUS',
8
-        'AUT','AZE','BDI','BEL','BEN','BES','BFA','BGD','BGR','BHR','BHS','BIH','BLM','BLR','BLZ','BMU','BOL','BRA',
9
-        'BRB','BRN','BTN','BVT','BWA','CAF','CAN','CCK','CHE','CHL','CHN','CIV','CMR','COD','COG','COK','COL','COM',
10
-        'CPV','CRI','CUB','CUW','CXR','CYM','CYP','CZE','DEU','DJI','DMA','DNK','DOM','DZA','ECU','EGY','ERI','ESH',
11
-        'ESP','EST','ETH','FIN','FJI','FLK','FRA','FRO','FSM','GAB','GBR','GEO','GGY','GHA','GIB','GIN','GLP','GMB',
12
-        'GNB','GNQ','GRC','GRD','GRL','GTM','GUF','GUM','GUY','HKG','HMD','HND','HRV','HTI','HUN','IDN','IMN','IND',
13
-        'IOT','IRL','IRN','IRQ','ISL','ISR','ITA','JAM','JEY','JOR','JPN','KAZ','KEN','KGZ','KHM','KIR','KNA','KOR',
14
-        'KWT','LAO','LBN','LBR','LBY','LCA','LIE','LKA','LSO','LTU','LUX','LVA','MAC','MAF','MAR','MCO','MDA','MDG',
15
-        'MDV','MEX','MHL','MKD','MLI','MLT','MMR','MNE','MNG','MNP','MOZ','MRT','MSR','MTQ','MUS','MWI','MYS','MYT',
16
-        'NAM','NCL','NER','NFK','NGA','NIC','NIU','NLD','NOR','NPL','NRU','NZL','OMN','PAK','PAN','PCN','PER','PHL',
17
-        'PLW','PNG','POL','PRI','PRK','PRT','PRY','PSE','PYF','QAT','REU','ROU','RUS','RWA','SAU','SDN','SEN','SGP',
18
-        'SGS','SHN','SJM','SLB','SLE','SLV','SMR','SOM','SPM','SRB','SSD','STP','SUR','SVK','SVN','SWE','SWZ','SXM',
19
-        'SYC','SYR','TCA','TCD','TGO','THA','TJK','TKL','TKM','TLS','TON','TTO','TUN','TUR','TUV','TWN','TZA','UGA',
20
-        'UKR','UMI','URY','USA','UZB','VAT','VCT','VEN','VGB','VIR','VNM','VUT','WLF','WSM','YEM','ZAF','ZMB','ZWE');
7
+    protected $acceptedCountries = array('ABW', 'AFG', 'AGO', 'AIA', 'ALA', 'ALB', 'AND', 'ARE', 'ARG', 'ARM', 'ASM', 'ATA', 'ATF', 'ATG', 'AUS',
8
+        'AUT', 'AZE', 'BDI', 'BEL', 'BEN', 'BES', 'BFA', 'BGD', 'BGR', 'BHR', 'BHS', 'BIH', 'BLM', 'BLR', 'BLZ', 'BMU', 'BOL', 'BRA',
9
+        'BRB', 'BRN', 'BTN', 'BVT', 'BWA', 'CAF', 'CAN', 'CCK', 'CHE', 'CHL', 'CHN', 'CIV', 'CMR', 'COD', 'COG', 'COK', 'COL', 'COM',
10
+        'CPV', 'CRI', 'CUB', 'CUW', 'CXR', 'CYM', 'CYP', 'CZE', 'DEU', 'DJI', 'DMA', 'DNK', 'DOM', 'DZA', 'ECU', 'EGY', 'ERI', 'ESH',
11
+        'ESP', 'EST', 'ETH', 'FIN', 'FJI', 'FLK', 'FRA', 'FRO', 'FSM', 'GAB', 'GBR', 'GEO', 'GGY', 'GHA', 'GIB', 'GIN', 'GLP', 'GMB',
12
+        'GNB', 'GNQ', 'GRC', 'GRD', 'GRL', 'GTM', 'GUF', 'GUM', 'GUY', 'HKG', 'HMD', 'HND', 'HRV', 'HTI', 'HUN', 'IDN', 'IMN', 'IND',
13
+        'IOT', 'IRL', 'IRN', 'IRQ', 'ISL', 'ISR', 'ITA', 'JAM', 'JEY', 'JOR', 'JPN', 'KAZ', 'KEN', 'KGZ', 'KHM', 'KIR', 'KNA', 'KOR',
14
+        'KWT', 'LAO', 'LBN', 'LBR', 'LBY', 'LCA', 'LIE', 'LKA', 'LSO', 'LTU', 'LUX', 'LVA', 'MAC', 'MAF', 'MAR', 'MCO', 'MDA', 'MDG',
15
+        'MDV', 'MEX', 'MHL', 'MKD', 'MLI', 'MLT', 'MMR', 'MNE', 'MNG', 'MNP', 'MOZ', 'MRT', 'MSR', 'MTQ', 'MUS', 'MWI', 'MYS', 'MYT',
16
+        'NAM', 'NCL', 'NER', 'NFK', 'NGA', 'NIC', 'NIU', 'NLD', 'NOR', 'NPL', 'NRU', 'NZL', 'OMN', 'PAK', 'PAN', 'PCN', 'PER', 'PHL',
17
+        'PLW', 'PNG', 'POL', 'PRI', 'PRK', 'PRT', 'PRY', 'PSE', 'PYF', 'QAT', 'REU', 'ROU', 'RUS', 'RWA', 'SAU', 'SDN', 'SEN', 'SGP',
18
+        'SGS', 'SHN', 'SJM', 'SLB', 'SLE', 'SLV', 'SMR', 'SOM', 'SPM', 'SRB', 'SSD', 'STP', 'SUR', 'SVK', 'SVN', 'SWE', 'SWZ', 'SXM',
19
+        'SYC', 'SYR', 'TCA', 'TCD', 'TGO', 'THA', 'TJK', 'TKL', 'TKM', 'TLS', 'TON', 'TTO', 'TUN', 'TUR', 'TUV', 'TWN', 'TZA', 'UGA',
20
+        'UKR', 'UMI', 'URY', 'USA', 'UZB', 'VAT', 'VCT', 'VEN', 'VGB', 'VIR', 'VNM', 'VUT', 'WLF', 'WSM', 'YEM', 'ZAF', 'ZMB', 'ZWE');
21 21
 
22 22
 }
23 23
\ No newline at end of file
Please login to merge, or discard this patch.
src/Models/Passport.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
      * @param string $value
12 12
      * @return $this
13 13
      */
14
-    public function number($value){
14
+    public function number($value) {
15 15
         $this->number = strval($value);
16 16
         return $this;
17 17
     }
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
      * @param string $value
21 21
      * @return $this
22 22
      */
23
-    public function issue_date($value){
23
+    public function issue_date($value) {
24 24
         $this->issue_date = strval($value);
25 25
         return $this;
26 26
     }
Please login to merge, or discard this patch.
src/Models/Dimension.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,9 +11,9 @@
 block discarded – undo
11 11
     public $unit;
12 12
 
13 13
 
14
-    public function __construct($width=null, $height=null, $depth=null, $unit=null)
14
+    public function __construct($width = null, $height = null, $depth = null, $unit = null)
15 15
     {
16
-        if ($width != null && $height != null && $depth != null && $unit != null){
16
+        if ($width != null && $height != null && $depth != null && $unit != null) {
17 17
             $this->width($width);
18 18
             $this->height($height);
19 19
             $this->depth($depth);
Please login to merge, or discard this patch.
src/Models/Item.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
      * @param string $value
17 17
      * @return $this
18 18
      */
19
-    public function description($value){
19
+    public function description($value) {
20 20
         $this->description = strval($value);
21 21
         return $this;
22 22
     }
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
      * @param integer $value
26 26
      * @return $this
27 27
      */
28
-    public function quantity($value){
28
+    public function quantity($value) {
29 29
         $this->quantity = intval($value);
30 30
         return $this;
31 31
     }
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
      * @param Money $price
35 35
      * @return $this
36 36
      */
37
-    public function price(Money $price){
37
+    public function price(Money $price) {
38 38
         $this->price = $price;
39 39
         return $this;
40 40
     }
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
      * @param Weight $weight
44 44
      * @return $this
45 45
      */
46
-    public function weight(Weight $weight){
46
+    public function weight(Weight $weight) {
47 47
         $this->weight = $weight;
48 48
         return $this;
49 49
     }
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
      * @param string $value
53 53
      * @return $this
54 54
      */
55
-    public function item_id($value){
55
+    public function item_id($value) {
56 56
         $this->item_id = strval($value);
57 57
         return $this;
58 58
     }
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
      * @return $this
63 63
      * @throws \Exception
64 64
      */
65
-    public function origin_country($value){
65
+    public function origin_country($value) {
66 66
        if (in_array($value, $this->acceptedCountries)) {
67 67
             $this->origin_country = $value;
68 68
         } else {
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
      * @param $value
77 77
      * @return $this
78 78
      */
79
-    public function sku($value){
79
+    public function sku($value) {
80 80
         $this->sku = strval($value);
81 81
         return $this;
82 82
     }
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
      * @param $value
86 86
      * @return $this
87 87
      */
88
-    public function hs_code($value){
88
+    public function hs_code($value) {
89 89
         $this->hs_code = strval($value);
90 90
         return $this;
91 91
     }
Please login to merge, or discard this patch.