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