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