@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | $prefix = 'AfriCC\\'; |
22 | 22 | |
23 | 23 | // base directory for the namespace prefix |
24 | - $base_dir = __DIR__ . '/'; |
|
24 | + $base_dir = __DIR__.'/'; |
|
25 | 25 | |
26 | 26 | // does the class use the namespace prefix? |
27 | 27 | $len = strlen($prefix); |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | // replace the namespace prefix with the base directory, replace namespace |
37 | 37 | // separators with directory separators in the relative class name, append |
38 | 38 | // with .php |
39 | - $file = $base_dir . str_replace('\\', '/', $relative_class) . '.php'; |
|
39 | + $file = $base_dir.str_replace('\\', '/', $relative_class).'.php'; |
|
40 | 40 | |
41 | 41 | // if the file exists, require it |
42 | 42 | if (file_exists($file)) { |
@@ -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])) { |
@@ -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 | } |
@@ -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'); |
@@ -318,7 +318,7 @@ |
||
318 | 318 | return false; |
319 | 319 | } |
320 | 320 | |
321 | - $ascii_email = substr($email, 0, $pos) . '@' . idn_to_ascii(substr($email, $pos + 1), 0, INTL_IDNA_VARIANT_2003); |
|
321 | + $ascii_email = substr($email, 0, $pos).'@'.idn_to_ascii(substr($email, $pos + 1), 0, INTL_IDNA_VARIANT_2003); |
|
322 | 322 | |
323 | 323 | return filter_var($ascii_email, FILTER_VALIDATE_EMAIL); |
324 | 324 | } |
@@ -83,7 +83,7 @@ |
||
83 | 83 | |
84 | 84 | public function addDisclose($value, $flag = 0) |
85 | 85 | { |
86 | - $this->appendDisclose(sprintf('contact:disclose[@flag=\'%d\']/contact:%s', (int)$flag, $value)); |
|
86 | + $this->appendDisclose(sprintf('contact:disclose[@flag=\'%d\']/contact:%s', (int) $flag, $value)); |
|
87 | 87 | } |
88 | 88 | |
89 | 89 | /** |
@@ -40,21 +40,21 @@ discard block |
||
40 | 40 | public function __construct(array $config) |
41 | 41 | { |
42 | 42 | if (!empty($config['host'])) { |
43 | - $this->host = (string)$config['host']; |
|
43 | + $this->host = (string) $config['host']; |
|
44 | 44 | } |
45 | 45 | |
46 | 46 | if (!empty($config['port'])) { |
47 | - $this->port = (int)$config['port']; |
|
47 | + $this->port = (int) $config['port']; |
|
48 | 48 | } else { |
49 | 49 | $this->port = 700; |
50 | 50 | } |
51 | 51 | |
52 | 52 | if (!empty($config['username'])) { |
53 | - $this->username = (string)$config['username']; |
|
53 | + $this->username = (string) $config['username']; |
|
54 | 54 | } |
55 | 55 | |
56 | 56 | if (!empty($config['password'])) { |
57 | - $this->password = (string)$config['password']; |
|
57 | + $this->password = (string) $config['password']; |
|
58 | 58 | } |
59 | 59 | |
60 | 60 | if (!empty($config['services']) && is_array($config['services'])) { |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | } |
73 | 73 | |
74 | 74 | if (!empty($config['local_cert'])) { |
75 | - $this->local_cert = (string)$config['local_cert']; |
|
75 | + $this->local_cert = (string) $config['local_cert']; |
|
76 | 76 | |
77 | 77 | if (!is_readable($this->local_cert)) { |
78 | 78 | throw new Exception(sprintf('unable to read local_cert: %s', $this->local_cert)); |
@@ -90,13 +90,13 @@ discard block |
||
90 | 90 | } |
91 | 91 | |
92 | 92 | if (!empty($config['connect_timeout'])) { |
93 | - $this->connect_timeout = (int)$config['connect_timeout']; |
|
93 | + $this->connect_timeout = (int) $config['connect_timeout']; |
|
94 | 94 | } else { |
95 | 95 | $this->connect_timeout = 4; |
96 | 96 | } |
97 | 97 | |
98 | 98 | if (!empty($config['timeout'])) { |
99 | - $this->timeout = (int)$config['timeout']; |
|
99 | + $this->timeout = (int) $config['timeout']; |
|
100 | 100 | } else { |
101 | 101 | $this->timeout = 8; |
102 | 102 | } |
@@ -206,9 +206,9 @@ discard block |
||
206 | 206 | $frame->setClientTransactionId($this->generateClientTransactionId()); |
207 | 207 | } |
208 | 208 | |
209 | - $buffer = (string)$frame; |
|
209 | + $buffer = (string) $frame; |
|
210 | 210 | $header = pack('N', mb_strlen($buffer, 'ASCII') + 4); |
211 | - return $this->send($header . $buffer); |
|
211 | + return $this->send($header.$buffer); |
|
212 | 212 | } |
213 | 213 | |
214 | 214 | /** |