@@ -104,6 +104,10 @@ discard block |
||
104 | 104 | |
105 | 105 | } |
106 | 106 | |
107 | + /** |
|
108 | + * @param string $data |
|
109 | + * @param boolean $key |
|
110 | + */ |
|
107 | 111 | private function can($data, $key) { |
108 | 112 | |
109 | 113 | if ( !empty($key) && is_string($key) ) { |
@@ -124,6 +128,10 @@ discard block |
||
124 | 128 | |
125 | 129 | } |
126 | 130 | |
131 | + /** |
|
132 | + * @param string $data |
|
133 | + * @param boolean $key |
|
134 | + */ |
|
127 | 135 | private function uncan($data, $key) { |
128 | 136 | |
129 | 137 | if ( !empty($key) && is_string($key) ) { |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | * @throws \Comodojo\Exception\RpcException |
23 | 23 | * @throws \Comodojo\Exception\HttpException |
24 | 24 | */ |
25 | - public function performCall($logger, $data, $content_type, $encrypt=false) { |
|
25 | + public function performCall($logger, $data, $content_type, $encrypt = false) { |
|
26 | 26 | |
27 | 27 | $this->setHttpMethod("POST"); |
28 | 28 | |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | |
77 | 77 | $this->aes->setKey($key); |
78 | 78 | |
79 | - $return = 'comodojo_encrypted_request-'.base64_encode( $this->aes->encrypt($data) ); |
|
79 | + $return = 'comodojo_encrypted_request-'.base64_encode($this->aes->encrypt($data)); |
|
80 | 80 | |
81 | 81 | } else { |
82 | 82 |
@@ -53,6 +53,9 @@ |
||
53 | 53 | |
54 | 54 | } |
55 | 55 | |
56 | + /** |
|
57 | + * @param string $response |
|
58 | + */ |
|
56 | 59 | public function decode($response) { |
57 | 60 | |
58 | 61 | try { |
@@ -75,13 +75,13 @@ discard block |
||
75 | 75 | |
76 | 76 | $this->logger->notice("Performing a single XML call"); |
77 | 77 | |
78 | - $this->logger->debug("Data dump before encoding", $request->toArray()); |
|
78 | + $this->logger->debug("Data dump before encoding", $request->toArray()); |
|
79 | 79 | |
80 | 80 | try { |
81 | 81 | |
82 | - // encoding |
|
82 | + // encoding |
|
83 | 83 | |
84 | - foreach ( $request->getSpecialTypes() as $key => $value ) { |
|
84 | + foreach ( $request->getSpecialTypes() as $key => $value ) { |
|
85 | 85 | |
86 | 86 | $this->encoder->setValueType($key, $value); |
87 | 87 | |
@@ -117,9 +117,9 @@ discard block |
||
117 | 117 | |
118 | 118 | $composed_requests = array(); |
119 | 119 | |
120 | - $this->logger->notice("Performing an XML multicall"); |
|
120 | + $this->logger->notice("Performing an XML multicall"); |
|
121 | 121 | |
122 | - $this->logger->debug("Data dump before encoding", $requests); |
|
122 | + $this->logger->debug("Data dump before encoding", $requests); |
|
123 | 123 | |
124 | 124 | foreach ($requests as $request) { |
125 | 125 |
@@ -121,7 +121,7 @@ |
||
121 | 121 | |
122 | 122 | $this->logger->debug("Data dump before encoding", $requests); |
123 | 123 | |
124 | - foreach ($requests as $request) { |
|
124 | + foreach ( $requests as $request ) { |
|
125 | 125 | |
126 | 126 | $composed_requests[] = array($request->getMethod(), $request->getParameters()); |
127 | 127 |
@@ -89,7 +89,7 @@ |
||
89 | 89 | |
90 | 90 | $element = array_filter( |
91 | 91 | $this->requests, |
92 | - function ($e) { |
|
92 | + function($e) { |
|
93 | 93 | return $e->getUid() == $uid; |
94 | 94 | } |
95 | 95 | ); |