Test Setup Failed
Push — master ( 9f8202...d6601c )
by Daniele
02:36
created
DataslangApi.php 2 patches
Indentation   +43 added lines, -43 removed lines patch added patch discarded remove patch
@@ -6,63 +6,63 @@
 block discarded – undo
6 6
 
7 7
 class DataslangApi {
8 8
 	
9
-	const BASE_URI = 'http://api.dataslang.com';
9
+    const BASE_URI = 'http://api.dataslang.com';
10 10
 	
11
-	private $client = null;
12
-	private $settings = array();
13
-	private $timeout = 2.0;
11
+    private $client = null;
12
+    private $settings = array();
13
+    private $timeout = 2.0;
14 14
   
15
-	public function __construct(){
16
-		$this->initSettings();		
17
-    	$this->client = new Client($this->settings);
18
-	}
15
+    public function __construct(){
16
+        $this->initSettings();		
17
+        $this->client = new Client($this->settings);
18
+    }
19 19
 
20
-	public function validate($xml, $xsd){
21
-		$result = null;
20
+    public function validate($xml, $xsd){
21
+        $result = null;
22 22
 		
23
-		try {
23
+        try {
24 24
 		
25 25
 
26
-			//     	$response = $this->client->request('POST', '/validate', [
27
-			//         	'form_params' => [
28
-			//             	'field_name' => 'abc',
29
-			//             	'other_field' => '123',
30
-			//             	'nested_field' => [
31
-			//                 	'nested' => 'hello'
32
-			//             	]
33
-			//         	]
34
-			//     	]);
26
+            //     	$response = $this->client->request('POST', '/validate', [
27
+            //         	'form_params' => [
28
+            //             	'field_name' => 'abc',
29
+            //             	'other_field' => '123',
30
+            //             	'nested_field' => [
31
+            //                 	'nested' => 'hello'
32
+            //             	]
33
+            //         	]
34
+            //     	]);
35 35
 			
36
-			$response = $this->client->request('POST', '/validate', [
37
-				'form_params' => [
38
-					'parametro' => 'prova'
39
-				]
40
-			]);
36
+            $response = $this->client->request('POST', '/validate', [
37
+                'form_params' => [
38
+                    'parametro' => 'prova'
39
+                ]
40
+            ]);
41 41
 			
42
-			$result = $res->getBody();
42
+            $result = $res->getBody();
43 43
 			
44
-		} catch (\Exception $e) {
44
+        } catch (\Exception $e) {
45 45
 			
46
-		}
46
+        }
47 47
 		
48
-		return $result;
49
-  	}
48
+        return $result;
49
+        }
50 50
   
51
-  	private function initSettings(){
52
-  		$this->settings['base_uri'] = $this->getBaseUri();
53
-  		$this->settings['timeout'] = $this->getTimeout();
54
-  	}
51
+        private function initSettings(){
52
+            $this->settings['base_uri'] = $this->getBaseUri();
53
+            $this->settings['timeout'] = $this->getTimeout();
54
+        }
55 55
   
56
-	public function setTimeout($timeout){
57
-		$this->timeout = $timeout;
58
-	}
56
+    public function setTimeout($timeout){
57
+        $this->timeout = $timeout;
58
+    }
59 59
 	
60
-	public function getTimeout(){
61
-		return $this->timeout;
62
-	}
60
+    public function getTimeout(){
61
+        return $this->timeout;
62
+    }
63 63
 	
64
-	public function getBaseUri(){
65
-		return self::BASE_URI;
66
-	}
64
+    public function getBaseUri(){
65
+        return self::BASE_URI;
66
+    }
67 67
 
68 68
 }
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -12,12 +12,12 @@  discard block
 block discarded – undo
12 12
 	private $settings = array();
13 13
 	private $timeout = 2.0;
14 14
   
15
-	public function __construct(){
15
+	public function __construct() {
16 16
 		$this->initSettings();		
17 17
     	$this->client = new Client($this->settings);
18 18
 	}
19 19
 
20
-	public function validate($xml, $xsd){
20
+	public function validate($xml, $xsd) {
21 21
 		$result = null;
22 22
 		
23 23
 		try {
@@ -48,20 +48,20 @@  discard block
 block discarded – undo
48 48
 		return $result;
49 49
   	}
50 50
   
51
-  	private function initSettings(){
52
-  		$this->settings['base_uri'] = $this->getBaseUri();
53
-  		$this->settings['timeout'] = $this->getTimeout();
51
+  	private function initSettings() {
52
+  		$this->settings[ 'base_uri' ] = $this->getBaseUri();
53
+  		$this->settings[ 'timeout' ] = $this->getTimeout();
54 54
   	}
55 55
   
56
-	public function setTimeout($timeout){
56
+	public function setTimeout($timeout) {
57 57
 		$this->timeout = $timeout;
58 58
 	}
59 59
 	
60
-	public function getTimeout(){
60
+	public function getTimeout() {
61 61
 		return $this->timeout;
62 62
 	}
63 63
 	
64
-	public function getBaseUri(){
64
+	public function getBaseUri() {
65 65
 		return self::BASE_URI;
66 66
 	}
67 67
 
Please login to merge, or discard this patch.