@@ -89,7 +89,7 @@ |
||
| 89 | 89 | |
| 90 | 90 | $element = array_filter( |
| 91 | 91 | $this->requests, |
| 92 | - function ($e) use ($uid) { |
|
| 92 | + function($e) use ($uid) { |
|
| 93 | 93 | return $e->getUid() == $uid; |
| 94 | 94 | } |
| 95 | 95 | ); |
@@ -7,7 +7,7 @@ |
||
| 7 | 7 | /** |
| 8 | 8 | * Perform call using transport layer |
| 9 | 9 | * |
| 10 | - * @param LoggerInterface $looger |
|
| 10 | + * @param LoggerInterface $logger |
|
| 11 | 11 | * @param string $data |
| 12 | 12 | * @param string $content_type |
| 13 | 13 | * @param string|bool $encrypt |
@@ -23,10 +23,11 @@ |
||
| 23 | 23 | /** |
| 24 | 24 | * Build the processor |
| 25 | 25 | * |
| 26 | - * @param string $encodint |
|
| 27 | - * @param LoggerInterface $looger |
|
| 26 | + * @param string $encoding |
|
| 27 | + * @param LoggerInterface $logger |
|
| 28 | 28 | * |
| 29 | 29 | * @throws Exception |
| 30 | + * @return void |
|
| 30 | 31 | */ |
| 31 | 32 | public function __construct($encoding, LoggerInterface $logger); |
| 32 | 33 | |
@@ -47,7 +47,7 @@ |
||
| 47 | 47 | |
| 48 | 48 | $proto = strtoupper($protocol); |
| 49 | 49 | |
| 50 | - if ( !in_array($proto, static::$supported_protocols) ){ |
|
| 50 | + if ( !in_array($proto, static::$supported_protocols) ) { |
|
| 51 | 51 | throw new Exception("Invalid RPC protocol"); |
| 52 | 52 | } |
| 53 | 53 | |
@@ -47,7 +47,7 @@ |
||
| 47 | 47 | |
| 48 | 48 | $proto = strtoupper($protocol); |
| 49 | 49 | |
| 50 | - if ( !in_array($proto, static::$supported_protocols) ){ |
|
| 50 | + if ( !in_array($proto, static::$supported_protocols) ) { |
|
| 51 | 51 | throw new Exception("Invalid RPC protocol"); |
| 52 | 52 | } |
| 53 | 53 | |
@@ -98,8 +98,7 @@ |
||
| 98 | 98 | |
| 99 | 99 | $this->setLogger( |
| 100 | 100 | is_null($logger) ? |
| 101 | - LogManager::create('rpcclient', false)->getLogger() : |
|
| 102 | - $logger |
|
| 101 | + LogManager::create('rpcclient', false)->getLogger() : $logger |
|
| 103 | 102 | ); |
| 104 | 103 | |
| 105 | 104 | $this->request = new RequestManager(); |
@@ -38,7 +38,7 @@ |
||
| 38 | 38 | |
| 39 | 39 | $payload = []; |
| 40 | 40 | |
| 41 | - foreach ($requests as $request) { |
|
| 41 | + foreach ( $requests as $request ) { |
|
| 42 | 42 | |
| 43 | 43 | list($composed, $rid) = self::composeJsonRequest($request); |
| 44 | 44 | |
@@ -93,11 +93,11 @@ discard block |
||
| 93 | 93 | |
| 94 | 94 | $this->logger->debug("Performing a single XML call"); |
| 95 | 95 | |
| 96 | - $this->logger->debug("Data dump before encoding", $request->toArray()); |
|
| 96 | + $this->logger->debug("Data dump before encoding", $request->toArray()); |
|
| 97 | 97 | |
| 98 | 98 | try { |
| 99 | 99 | |
| 100 | - // encoding |
|
| 100 | + // encoding |
|
| 101 | 101 | foreach ( $request->getSpecialTypes() as $key => $value ) { |
| 102 | 102 | |
| 103 | 103 | $this->encoder->setValueType($key, $value); |
@@ -129,9 +129,9 @@ discard block |
||
| 129 | 129 | |
| 130 | 130 | $composed_requests = []; |
| 131 | 131 | |
| 132 | - $this->logger->debug("Performing an XML multicall"); |
|
| 132 | + $this->logger->debug("Performing an XML multicall"); |
|
| 133 | 133 | |
| 134 | - $this->logger->debug("Data dump before encoding", $requests); |
|
| 134 | + $this->logger->debug("Data dump before encoding", $requests); |
|
| 135 | 135 | |
| 136 | 136 | foreach ($requests as $request) { |
| 137 | 137 | |
@@ -133,7 +133,7 @@ |
||
| 133 | 133 | |
| 134 | 134 | $this->logger->debug("Data dump before encoding", $requests); |
| 135 | 135 | |
| 136 | - foreach ($requests as $request) { |
|
| 136 | + foreach ( $requests as $request ) { |
|
| 137 | 137 | |
| 138 | 138 | $composed_requests[] = [ |
| 139 | 139 | $request->getMethod(), |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | LoggerInterface $logger, |
| 45 | 45 | $data, |
| 46 | 46 | $content_type, |
| 47 | - $encrypt=false |
|
| 47 | + $encrypt = false |
|
| 48 | 48 | ) { |
| 49 | 49 | |
| 50 | 50 | $this->setHttpMethod("POST"); |
@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | |
| 100 | 100 | $this->aes->setKey($key); |
| 101 | 101 | |
| 102 | - $return = 'comodojo_encrypted_request-'.base64_encode( $this->aes->encrypt($data) ); |
|
| 102 | + $return = 'comodojo_encrypted_request-'.base64_encode($this->aes->encrypt($data)); |
|
| 103 | 103 | |
| 104 | 104 | } else { |
| 105 | 105 | |
@@ -181,8 +181,8 @@ |
||
| 181 | 181 | if ( |
| 182 | 182 | $id === null || |
| 183 | 183 | is_bool($id) || |
| 184 | - ( is_int($id) && $id > 0 ) || |
|
| 185 | - ( is_string($id) && !empty($id) ) |
|
| 184 | + (is_int($id) && $id > 0) || |
|
| 185 | + (is_string($id) && !empty($id)) |
|
| 186 | 186 | ) { |
| 187 | 187 | |
| 188 | 188 | $this->id = $id; |