Passed
Push — master ( 789124...aa2b24 )
by Nicholas
01:56
created
src/Atdconnect.php 2 patches
Indentation   +69 added lines, -69 removed lines patch added patch discarded remove patch
@@ -7,21 +7,21 @@  discard block
 block discarded – undo
7 7
 class Atdconnect
8 8
 {
9 9
     
10
-    private static $wsshead;
11
-    private static $statuswsdl		= 'https://testws.atdconnect.com/ws/3_4/orderStatus.wsdl';
12
-    private static $brandwsdl 		= 'https://testws.atdconnect.com/ws/3_4/brandstyles.wsdl';
13
-    private static $locationwsdl	= 'https://testws.atdconnect.com/ws/3_4/locations.wsdl';
14
-    private static $productwsdl 	= 'https://testws.atdconnect.com/ws/3_4/products.wsdl';
15
-    private static $orderwsdl		= 'https://testws.atdconnect.com/ws/3_4/orders.wsdl';
10
+        private static $wsshead;
11
+        private static $statuswsdl		= 'https://testws.atdconnect.com/ws/3_4/orderStatus.wsdl';
12
+        private static $brandwsdl 		= 'https://testws.atdconnect.com/ws/3_4/brandstyles.wsdl';
13
+        private static $locationwsdl	= 'https://testws.atdconnect.com/ws/3_4/locations.wsdl';
14
+        private static $productwsdl 	= 'https://testws.atdconnect.com/ws/3_4/products.wsdl';
15
+        private static $orderwsdl		= 'https://testws.atdconnect.com/ws/3_4/orders.wsdl';
16 16
     
17 17
     
18
-    public function __construct($user, $pass, $client)
19
-    {
18
+        public function __construct($user, $pass, $client)
19
+        {
20 20
         self::$wsshead = $this->getWSSHeader($user, $pass, $client);
21
-    }
21
+        }
22 22
     
23
-    public static function getWSSHeader($user, $pass, $client)
24
-    {
23
+        public static function getWSSHeader($user, $pass, $client)
24
+        {
25 25
         $xml = '
26 26
 		<wsse:Security SOAP-ENV:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
27 27
 		    <wsse:UsernameToken atd:clientId="' . $client . '" xmlns:atd="http://api.atdconnect.com/atd">
@@ -32,101 +32,101 @@  discard block
 block discarded – undo
32 32
 		';
33 33
         
34 34
         return new \SoapHeader('http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd', 'Security', new \SoapVar($xml, XSD_ANYXML), true);
35
-    }
35
+        }
36 36
     
37
-    public static function apiCall($call,$query,$service)
38
-    {
37
+        public static function apiCall($call,$query,$service)
38
+        {
39 39
         $client     = new \SoapClient($service);
40 40
         $client->__setSoapHeaders(self::$wsshead);
41 41
         $response 	= $client->$call($query);
42 42
         return $response;
43
-    }
43
+        }
44 44
     
45
-    //************************************************
46
-    //               Location Service
47
-    //************************************************
45
+        //************************************************
46
+        //               Location Service
47
+        //************************************************
48 48
     
49
-    public static function getLocationByCriteria()
50
-    {
49
+        public static function getLocationByCriteria()
50
+        {
51 51
         return self::apiCall('getLocationByCriteria','',self::$locationwsdl);
52
-    }
52
+        }
53 53
     
54
-    public static function getLocationCutoffTimes($location = '1213421')
55
-    {
54
+        public static function getLocationCutoffTimes($location = '1213421')
55
+        {
56 56
         return self::apiCall('getLocationCutoffTimes',array('location' => $location),self::$locationwsdl);
57
-    }
57
+        }
58 58
     
59
-    public static function getDistributionCenter($dc = '059')
60
-    {
59
+        public static function getDistributionCenter($dc = '059')
60
+        {
61 61
         return self::apiCall('getDistributionCenter',array('servicingDC' => $dc),self::$locationwsdl);
62
-    }
62
+        }
63 63
     
64 64
         
65
-    //************************************************
66
-    //               Brand Styles Service
67
-    //************************************************
65
+        //************************************************
66
+        //               Brand Styles Service
67
+        //************************************************
68 68
     
69 69
     
70
-    public static function getBrand($location, $product = null)
71
-    {
72
-    	return self::apiCall('getBrand',array('locationNumber' => $location,'productGroup' => $product),self::$brandwsdl);
73
-    }
70
+        public static function getBrand($location, $product = null)
71
+        {
72
+                return self::apiCall('getBrand',array('locationNumber' => $location,'productGroup' => $product),self::$brandwsdl);
73
+        }
74 74
     
75
-    public static function getStyle($location, $brand = null)
76
-    {
77
-    	return self::apiCall('getStyle',array('locationNumber' => $location,'brand' => $brand),self::$brandwsdl);
78
-    }
75
+        public static function getStyle($location, $brand = null)
76
+        {
77
+                return self::apiCall('getStyle',array('locationNumber' => $location,'brand' => $brand),self::$brandwsdl);
78
+        }
79 79
     
80 80
     
81
-    //************************************************
82
-    //               Products Service
83
-    //************************************************
81
+        //************************************************
82
+        //               Products Service
83
+        //************************************************
84 84
     
85 85
     
86 86
     
87 87
     
88
-    public static function getProdBrand($location, $product = null)
89
-    {
90
-    	return self::apiCall('getProdBrand',array('locationNumber' => $location,'productGroup' => $product),self::$productwsdl);
91
-    }
88
+        public static function getProdBrand($location, $product = null)
89
+        {
90
+                return self::apiCall('getProdBrand',array('locationNumber' => $location,'productGroup' => $product),self::$productwsdl);
91
+        }
92 92
     
93
-    public static function getProductByCriteria($search)
94
-    {
93
+        public static function getProductByCriteria($search)
94
+        {
95 95
         return self::apiCall('getProductByCriteria',$search,self::$productwsdl);
96
-    }
96
+        }
97 97
     
98
-    public static function getProductByKeyword($search)
99
-    {
98
+        public static function getProductByKeyword($search)
99
+        {
100 100
         return self::apiCall('getProductByKeyword',$search,self::$productwsdl);
101
-    }
101
+        }
102 102
     
103
-    //************************************************
104
-    //               Order Service
105
-    //************************************************
103
+        //************************************************
104
+        //               Order Service
105
+        //************************************************
106 106
     
107
-    public static function placeOrder($order)
108
-    {
107
+        public static function placeOrder($order)
108
+        {
109 109
         return self::apiCall('placeOrder',$order,self::$orderwsdl);
110
-    }
110
+        }
111 111
     
112
-    public static function previewOrder($order)
113
-    {
112
+        public static function previewOrder($order)
113
+        {
114 114
         return self::apiCall('previewOrder',$order,self::$orderwsdl);
115
-    }
115
+        }
116 116
     
117
-    //************************************************
118
-    //               Order Status Service
119
-    //************************************************
117
+        //************************************************
118
+        //               Order Status Service
119
+        //************************************************
120 120
     
121
-    public static function getOrderDetail($status)
122
-    {
121
+        public static function getOrderDetail($status)
122
+        {
123 123
         return self::apiCall('getOrderDetail',$status,self::$statuswsdl);
124
-    }
124
+        }
125 125
     
126
-    public static function getOrderStatusByCriteria($criteria)
127
-    {
126
+        public static function getOrderStatusByCriteria($criteria)
127
+        {
128 128
         return self::apiCall('getOrderStatusByCriteria',$status,self::$statuswsdl);
129
-    }
129
+        }
130 130
     
131 131
     
132 132
     
Please login to merge, or discard this patch.
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
     private static $brandwsdl 		= 'https://testws.atdconnect.com/ws/3_4/brandstyles.wsdl';
13 13
     private static $locationwsdl	= 'https://testws.atdconnect.com/ws/3_4/locations.wsdl';
14 14
     private static $productwsdl 	= 'https://testws.atdconnect.com/ws/3_4/products.wsdl';
15
-    private static $orderwsdl		= 'https://testws.atdconnect.com/ws/3_4/orders.wsdl';
15
+    private static $orderwsdl = 'https://testws.atdconnect.com/ws/3_4/orders.wsdl';
16 16
     
17 17
     
18 18
     public function __construct($user, $pass, $client)
@@ -24,9 +24,9 @@  discard block
 block discarded – undo
24 24
     {
25 25
         $xml = '
26 26
 		<wsse:Security SOAP-ENV:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
27
-		    <wsse:UsernameToken atd:clientId="' . $client . '" xmlns:atd="http://api.atdconnect.com/atd">
28
-		        <wsse:Username>' . $user . '</wsse:Username>
29
-		        <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">' . $pass . '</wsse:Password>
27
+		    <wsse:UsernameToken atd:clientId="' . $client.'" xmlns:atd="http://api.atdconnect.com/atd">
28
+		        <wsse:Username>' . $user.'</wsse:Username>
29
+		        <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">' . $pass.'</wsse:Password>
30 30
 		    </wsse:UsernameToken>
31 31
 		</wsse:Security>
32 32
 		';
@@ -34,11 +34,11 @@  discard block
 block discarded – undo
34 34
         return new \SoapHeader('http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd', 'Security', new \SoapVar($xml, XSD_ANYXML), true);
35 35
     }
36 36
     
37
-    public static function apiCall($call,$query,$service)
37
+    public static function apiCall($call, $query, $service)
38 38
     {
39
-        $client     = new \SoapClient($service);
39
+        $client = new \SoapClient($service);
40 40
         $client->__setSoapHeaders(self::$wsshead);
41
-        $response 	= $client->$call($query);
41
+        $response = $client->$call($query);
42 42
         return $response;
43 43
     }
44 44
     
@@ -48,17 +48,17 @@  discard block
 block discarded – undo
48 48
     
49 49
     public static function getLocationByCriteria()
50 50
     {
51
-        return self::apiCall('getLocationByCriteria','',self::$locationwsdl);
51
+        return self::apiCall('getLocationByCriteria', '', self::$locationwsdl);
52 52
     }
53 53
     
54 54
     public static function getLocationCutoffTimes($location = '1213421')
55 55
     {
56
-        return self::apiCall('getLocationCutoffTimes',array('location' => $location),self::$locationwsdl);
56
+        return self::apiCall('getLocationCutoffTimes', array('location' => $location), self::$locationwsdl);
57 57
     }
58 58
     
59 59
     public static function getDistributionCenter($dc = '059')
60 60
     {
61
-        return self::apiCall('getDistributionCenter',array('servicingDC' => $dc),self::$locationwsdl);
61
+        return self::apiCall('getDistributionCenter', array('servicingDC' => $dc), self::$locationwsdl);
62 62
     }
63 63
     
64 64
         
@@ -69,12 +69,12 @@  discard block
 block discarded – undo
69 69
     
70 70
     public static function getBrand($location, $product = null)
71 71
     {
72
-    	return self::apiCall('getBrand',array('locationNumber' => $location,'productGroup' => $product),self::$brandwsdl);
72
+    	return self::apiCall('getBrand', array('locationNumber' => $location, 'productGroup' => $product), self::$brandwsdl);
73 73
     }
74 74
     
75 75
     public static function getStyle($location, $brand = null)
76 76
     {
77
-    	return self::apiCall('getStyle',array('locationNumber' => $location,'brand' => $brand),self::$brandwsdl);
77
+    	return self::apiCall('getStyle', array('locationNumber' => $location, 'brand' => $brand), self::$brandwsdl);
78 78
     }
79 79
     
80 80
     
@@ -87,17 +87,17 @@  discard block
 block discarded – undo
87 87
     
88 88
     public static function getProdBrand($location, $product = null)
89 89
     {
90
-    	return self::apiCall('getProdBrand',array('locationNumber' => $location,'productGroup' => $product),self::$productwsdl);
90
+    	return self::apiCall('getProdBrand', array('locationNumber' => $location, 'productGroup' => $product), self::$productwsdl);
91 91
     }
92 92
     
93 93
     public static function getProductByCriteria($search)
94 94
     {
95
-        return self::apiCall('getProductByCriteria',$search,self::$productwsdl);
95
+        return self::apiCall('getProductByCriteria', $search, self::$productwsdl);
96 96
     }
97 97
     
98 98
     public static function getProductByKeyword($search)
99 99
     {
100
-        return self::apiCall('getProductByKeyword',$search,self::$productwsdl);
100
+        return self::apiCall('getProductByKeyword', $search, self::$productwsdl);
101 101
     }
102 102
     
103 103
     //************************************************
@@ -106,12 +106,12 @@  discard block
 block discarded – undo
106 106
     
107 107
     public static function placeOrder($order)
108 108
     {
109
-        return self::apiCall('placeOrder',$order,self::$orderwsdl);
109
+        return self::apiCall('placeOrder', $order, self::$orderwsdl);
110 110
     }
111 111
     
112 112
     public static function previewOrder($order)
113 113
     {
114
-        return self::apiCall('previewOrder',$order,self::$orderwsdl);
114
+        return self::apiCall('previewOrder', $order, self::$orderwsdl);
115 115
     }
116 116
     
117 117
     //************************************************
@@ -120,12 +120,12 @@  discard block
 block discarded – undo
120 120
     
121 121
     public static function getOrderDetail($status)
122 122
     {
123
-        return self::apiCall('getOrderDetail',$status,self::$statuswsdl);
123
+        return self::apiCall('getOrderDetail', $status, self::$statuswsdl);
124 124
     }
125 125
     
126 126
     public static function getOrderStatusByCriteria($criteria)
127 127
     {
128
-        return self::apiCall('getOrderStatusByCriteria',$status,self::$statuswsdl);
128
+        return self::apiCall('getOrderStatusByCriteria', $status, self::$statuswsdl);
129 129
     }
130 130
     
131 131
     
Please login to merge, or discard this patch.