@@ -104,7 +104,7 @@ |
||
| 104 | 104 | if (strpos($method_name, 'Add') === 0) { |
| 105 | 105 | $method_name = lcfirst($method_name); |
| 106 | 106 | } else { |
| 107 | - $method_name = 'set' . $method_name; |
|
| 107 | + $method_name = 'set'.$method_name; |
|
| 108 | 108 | } |
| 109 | 109 | |
| 110 | 110 | if (is_callable([$this, $method_name])) { |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | |
| 48 | 48 | $base_path = sprintf($base_path, $this->host_attr_index); |
| 49 | 49 | |
| 50 | - $this->set($base_path . '/domain:hostName', $host); |
|
| 50 | + $this->set($base_path.'/domain:hostName', $host); |
|
| 51 | 51 | |
| 52 | 52 | if (!empty($ips) && is_array($ips)) { |
| 53 | 53 | foreach ($ips as $ip) { |
@@ -55,9 +55,9 @@ discard block |
||
| 55 | 55 | if ($ip_type === false) { |
| 56 | 56 | throw new Exception(sprintf('%s is not a valid IP address', $ip)); |
| 57 | 57 | } elseif ($ip_type === Validator::TYPE_IPV4) { |
| 58 | - $this->set($base_path . '/domain:hostAddr[@ip=\'v4\']', $ip); |
|
| 58 | + $this->set($base_path.'/domain:hostAddr[@ip=\'v4\']', $ip); |
|
| 59 | 59 | } elseif ($ip_type === Validator::TYPE_IPV6) { |
| 60 | - $this->set($base_path . '/domain:hostAddr[@ip=\'v6\']', $ip); |
|
| 60 | + $this->set($base_path.'/domain:hostAddr[@ip=\'v6\']', $ip); |
|
| 61 | 61 | } |
| 62 | 62 | } |
| 63 | 63 | } |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | if (strpos($path_parts[$i], ':') === false) { |
| 105 | 105 | $node_ns = 'epp'; |
| 106 | 106 | $node_name = $path_parts[$i]; |
| 107 | - $path_parts[$i] = $node_ns . ':' . $node_name; |
|
| 107 | + $path_parts[$i] = $node_ns.':'.$node_name; |
|
| 108 | 108 | } else { |
| 109 | 109 | list($node_ns, $node_name) = explode(':', $path_parts[$i], 2); |
| 110 | 110 | } |
@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | // get next key |
| 116 | 116 | $next_key = -1; |
| 117 | 117 | foreach (array_keys($this->nodes) as $each) { |
| 118 | - if (preg_match('/' . preg_quote($node_ns . ':' . $node_name, '/') . '\[(\d+)\]$/', $each, $matches)) { |
|
| 118 | + if (preg_match('/'.preg_quote($node_ns.':'.$node_name, '/').'\[(\d+)\]$/', $each, $matches)) { |
|
| 119 | 119 | if ($matches[1] > $next_key) { |
| 120 | 120 | $next_key = (int) $matches[1]; |
| 121 | 121 | } |
@@ -151,7 +151,7 @@ discard block |
||
| 151 | 151 | if ($node_ns === 'epp') { |
| 152 | 152 | $this->nodes[$node_path] = $this->createElementNS($node_xmlns, $node_name); |
| 153 | 153 | } else { |
| 154 | - $this->nodes[$node_path] = $this->createElementNS($node_xmlns, $node_ns . ':' . $node_name); |
|
| 154 | + $this->nodes[$node_path] = $this->createElementNS($node_xmlns, $node_ns.':'.$node_name); |
|
| 155 | 155 | } |
| 156 | 156 | |
| 157 | 157 | // set attribute |
@@ -184,15 +184,15 @@ discard block |
||
| 184 | 184 | } |
| 185 | 185 | |
| 186 | 186 | if (!empty($this->mapping) && !empty($this->command)) { |
| 187 | - array_unshift($path_parts, $this->mapping . ':' . $this->command); |
|
| 187 | + array_unshift($path_parts, $this->mapping.':'.$this->command); |
|
| 188 | 188 | } |
| 189 | 189 | |
| 190 | 190 | if (!empty($this->command)) { |
| 191 | - array_unshift($path_parts, 'epp:' . $this->command); |
|
| 191 | + array_unshift($path_parts, 'epp:'.$this->command); |
|
| 192 | 192 | } |
| 193 | 193 | |
| 194 | 194 | if (!empty($this->format)) { |
| 195 | - array_unshift($path_parts, 'epp:' . $this->format); |
|
| 195 | + array_unshift($path_parts, 'epp:'.$this->format); |
|
| 196 | 196 | } |
| 197 | 197 | |
| 198 | 198 | array_unshift($path_parts, 'epp:epp'); |
@@ -109,7 +109,7 @@ discard block |
||
| 109 | 109 | // if node only has a type attribute lets distinguish them directly |
| 110 | 110 | // and then ignore the attribtue |
| 111 | 111 | if ($each->hasAttribute('type')) { |
| 112 | - $key = $each->localName . '@' . $each->getAttribute('type'); |
|
| 112 | + $key = $each->localName.'@'.$each->getAttribute('type'); |
|
| 113 | 113 | $ignore_attributes = true; |
| 114 | 114 | } else { |
| 115 | 115 | $key = $each->localName; |
@@ -152,12 +152,12 @@ discard block |
||
| 152 | 152 | } |
| 153 | 153 | |
| 154 | 154 | if ($insert_key) { |
| 155 | - if (isset($tmp['@' . $key][$attr->nodeName]) && !is_array($tmp['@' . $key][$attr->nodeName])) { |
|
| 156 | - $tmp['@' . $key][$attr->nodeName] = [$tmp['@' . $key][$attr->nodeName]]; |
|
| 155 | + if (isset($tmp['@'.$key][$attr->nodeName]) && !is_array($tmp['@'.$key][$attr->nodeName])) { |
|
| 156 | + $tmp['@'.$key][$attr->nodeName] = [$tmp['@'.$key][$attr->nodeName]]; |
|
| 157 | 157 | } |
| 158 | - $tmp['@' . $key][$attr->nodeName][$insert_key] = $attr->nodeValue; |
|
| 158 | + $tmp['@'.$key][$attr->nodeName][$insert_key] = $attr->nodeValue; |
|
| 159 | 159 | } else { |
| 160 | - $tmp['@' . $key][$attr->nodeName] = $attr->nodeValue; |
|
| 160 | + $tmp['@'.$key][$attr->nodeName] = $attr->nodeValue; |
|
| 161 | 161 | } |
| 162 | 162 | } |
| 163 | 163 | } |
@@ -328,7 +328,7 @@ |
||
| 328 | 328 | return false; |
| 329 | 329 | } |
| 330 | 330 | |
| 331 | - $ascii_email = substr($email, 0, $pos) . '@' . idn_to_ascii(substr($email, $pos + 1), IDNA_DEFAULT, INTL_IDNA_VARIANT_UTS46); |
|
| 331 | + $ascii_email = substr($email, 0, $pos).'@'.idn_to_ascii(substr($email, $pos + 1), IDNA_DEFAULT, INTL_IDNA_VARIANT_UTS46); |
|
| 332 | 332 | |
| 333 | 333 | return (bool) filter_var($ascii_email, FILTER_VALIDATE_EMAIL); |
| 334 | 334 | } |
@@ -150,7 +150,7 @@ |
||
| 150 | 150 | */ |
| 151 | 151 | public function removeSecDNSAll($all = true) |
| 152 | 152 | { |
| 153 | - $this->set('//epp:epp/epp:command/epp:extension/secDNS:update/secDNS:rem/secDNS:all', $all ? 'true': 'false'); |
|
| 153 | + $this->set('//epp:epp/epp:command/epp:extension/secDNS:update/secDNS:rem/secDNS:all', $all ? 'true' : 'false'); |
|
| 154 | 154 | } |
| 155 | 155 | |
| 156 | 156 | public function removeAdminContact($contact) |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | parent::__construct($config); |
| 32 | 32 | |
| 33 | 33 | if (!empty($config['chunk_size'])) { |
| 34 | - $this->chunk_size = (int)$config['chunk_size']; |
|
| 34 | + $this->chunk_size = (int) $config['chunk_size']; |
|
| 35 | 35 | } else { |
| 36 | 36 | $this->chunk_size = 1024; |
| 37 | 37 | } |
@@ -69,10 +69,10 @@ discard block |
||
| 69 | 69 | stream_context_set_option($context, 'ssl', 'passphrase', $this->passphrase); |
| 70 | 70 | } |
| 71 | 71 | } |
| 72 | - if ($this->ca_cert !== null){ |
|
| 72 | + if ($this->ca_cert !== null) { |
|
| 73 | 73 | stream_context_set_option($context, 'ssl', 'cafile', $this->ca_cert); |
| 74 | 74 | } |
| 75 | - if ($this->pk_cert !== null){ |
|
| 75 | + if ($this->pk_cert !== null) { |
|
| 76 | 76 | stream_context_set_option($context, 'ssl', 'local_pk', $this->pk_cert); |
| 77 | 77 | } |
| 78 | 78 | } |
@@ -162,7 +162,7 @@ discard block |
||
| 162 | 162 | $buffer = (string) $frame; |
| 163 | 163 | $header = pack('N', mb_strlen($buffer, 'ASCII') + 4); |
| 164 | 164 | |
| 165 | - return $this->send($header . $buffer); |
|
| 165 | + return $this->send($header.$buffer); |
|
| 166 | 166 | } |
| 167 | 167 | |
| 168 | 168 | /** |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | } |
| 38 | 38 | |
| 39 | 39 | if (!empty($config['port'])) { |
| 40 | - $this->port = (int)$config['port']; |
|
| 40 | + $this->port = (int) $config['port']; |
|
| 41 | 41 | } else { |
| 42 | 42 | $this->port = false; |
| 43 | 43 | } |
@@ -122,7 +122,7 @@ discard block |
||
| 122 | 122 | $login = new LoginCommand(); |
| 123 | 123 | $login->setClientId($this->username); |
| 124 | 124 | $login->setPassword($this->password); |
| 125 | - if ($newPassword){ |
|
| 125 | + if ($newPassword) { |
|
| 126 | 126 | $login->setNewPassword($newPassword); |
| 127 | 127 | } |
| 128 | 128 | $login->setVersion('1.0'); |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | * |
| 40 | 40 | * @param bool|string $newPassword String with new password to set upon login, false if no password |
| 41 | 41 | */ |
| 42 | - public function connect($newPassword=false) |
|
| 42 | + public function connect($newPassword = false) |
|
| 43 | 43 | { |
| 44 | 44 | $proto = \parse_url($this->host, PHP_URL_SCHEME); |
| 45 | 45 | if ($this->ssl || $proto == 'https') { |
@@ -124,7 +124,7 @@ discard block |
||
| 124 | 124 | public function send(FrameInterface $frame) |
| 125 | 125 | { |
| 126 | 126 | |
| 127 | - $content = (string)$frame; |
|
| 127 | + $content = (string) $frame; |
|
| 128 | 128 | curl_setopt($this->curl, CURLOPT_POSTFIELDS, $content); |
| 129 | 129 | |
| 130 | 130 | return curl_exec($this->curl); |
@@ -158,7 +158,7 @@ discard block |
||
| 158 | 158 | |
| 159 | 159 | protected function log($message) |
| 160 | 160 | { |
| 161 | - if($this->debug) { |
|
| 161 | + if ($this->debug) { |
|
| 162 | 162 | \error_log($message); |
| 163 | 163 | } |
| 164 | 164 | } |