@@ -43,8 +43,6 @@ |
||
43 | 43 | /** |
44 | 44 | * Construct (with import if specified) frame |
45 | 45 | * |
46 | - * @param DOMDocument $import |
|
47 | - * @param ObjectSpec $objectSpec |
|
48 | 46 | */ |
49 | 47 | public function __construct() |
50 | 48 | { |
@@ -56,21 +56,21 @@ discard block |
||
56 | 56 | $objectSpec = null; |
57 | 57 | |
58 | 58 | $num = func_num_args(); |
59 | - if($num>2){ |
|
59 | + if ($num > 2) { |
|
60 | 60 | throw new Exception("Too many arguments"); |
61 | 61 | } |
62 | 62 | |
63 | 63 | $args = func_get_args(); |
64 | - foreach($args as $arg){ |
|
65 | - if($arg instanceof \DOMDocument){ |
|
64 | + foreach ($args as $arg) { |
|
65 | + if ($arg instanceof \DOMDocument) { |
|
66 | 66 | $import = $arg; |
67 | 67 | } |
68 | - if($arg instanceof ObjectSpec){ |
|
68 | + if ($arg instanceof ObjectSpec) { |
|
69 | 69 | $objectSpec = $arg; |
70 | 70 | } |
71 | 71 | } |
72 | 72 | |
73 | - if(\is_null($objectSpec)){ |
|
73 | + if (\is_null($objectSpec)) { |
|
74 | 74 | $objectSpec = new ObjectSpec(); |
75 | 75 | } |
76 | 76 | |
@@ -169,7 +169,7 @@ discard block |
||
169 | 169 | if (strpos($path_parts[$i], ':') === false) { |
170 | 170 | $node_ns = 'epp'; |
171 | 171 | $node_name = $path_parts[$i]; |
172 | - $path_parts[$i] = $node_ns . ':' . $node_name; |
|
172 | + $path_parts[$i] = $node_ns.':'.$node_name; |
|
173 | 173 | } else { |
174 | 174 | list($node_ns, $node_name) = explode(':', $path_parts[$i], 2); |
175 | 175 | } |
@@ -180,7 +180,7 @@ discard block |
||
180 | 180 | // get next key |
181 | 181 | $next_key = -1; |
182 | 182 | foreach (array_keys($this->nodes) as $each) { |
183 | - if (preg_match('/' . preg_quote($node_ns . ':' . $node_name, '/') . '\[(\d+)\]$/', $each, $matches)) { |
|
183 | + if (preg_match('/'.preg_quote($node_ns.':'.$node_name, '/').'\[(\d+)\]$/', $each, $matches)) { |
|
184 | 184 | if ($matches[1] > $next_key) { |
185 | 185 | $next_key = (int) $matches[1]; |
186 | 186 | } |
@@ -216,7 +216,7 @@ discard block |
||
216 | 216 | if ($node_ns === 'epp') { |
217 | 217 | $this->nodes[$node_path] = $this->createElementNS($node_xmlns, $node_name); |
218 | 218 | } else { |
219 | - $this->nodes[$node_path] = $this->createElementNS($node_xmlns, $node_ns . ':' . $node_name); |
|
219 | + $this->nodes[$node_path] = $this->createElementNS($node_xmlns, $node_ns.':'.$node_name); |
|
220 | 220 | } |
221 | 221 | |
222 | 222 | // set attribute |
@@ -255,15 +255,15 @@ discard block |
||
255 | 255 | } |
256 | 256 | |
257 | 257 | if (!empty($this->mapping) && !empty($this->command)) { |
258 | - array_unshift($path_parts, $this->mapping . ':' . $this->command); |
|
258 | + array_unshift($path_parts, $this->mapping.':'.$this->command); |
|
259 | 259 | } |
260 | 260 | |
261 | 261 | if (!empty($this->command) && !$this->ignore_command) { |
262 | - array_unshift($path_parts, 'epp:' . $this->command); |
|
262 | + array_unshift($path_parts, 'epp:'.$this->command); |
|
263 | 263 | } |
264 | 264 | |
265 | 265 | if (!empty($this->format)) { |
266 | - array_unshift($path_parts, 'epp:' . $this->format); |
|
266 | + array_unshift($path_parts, 'epp:'.$this->format); |
|
267 | 267 | } |
268 | 268 | |
269 | 269 | array_unshift($path_parts, 'epp:epp'); |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | // filter out empty user provided values |
83 | 83 | $options_array = array_filter( |
84 | 84 | $options_array, |
85 | - function ($var) { |
|
85 | + function($var) { |
|
86 | 86 | return !is_null($var); |
87 | 87 | } |
88 | 88 | ); |
@@ -184,7 +184,7 @@ discard block |
||
184 | 184 | $buffer = (string) $frame; |
185 | 185 | $header = pack('N', mb_strlen($buffer, 'ASCII') + 4); |
186 | 186 | |
187 | - return $this->send($header . $buffer); |
|
187 | + return $this->send($header.$buffer); |
|
188 | 188 | } |
189 | 189 | |
190 | 190 | protected function log($message, $color = '0;32') |
@@ -35,7 +35,7 @@ |
||
35 | 35 | |
36 | 36 | $xpath = new DOMXPath($xml); |
37 | 37 | |
38 | - if(is_null($objectSpec)){ |
|
38 | + if (is_null($objectSpec)) { |
|
39 | 39 | $objectSpec = new ObjectSpec(); |
40 | 40 | } |
41 | 41 |
@@ -87,7 +87,7 @@ |
||
87 | 87 | $this->debug = false; |
88 | 88 | } |
89 | 89 | |
90 | - if(is_null($objectSpec)){ |
|
90 | + if (is_null($objectSpec)) { |
|
91 | 91 | $objectSpec = new ObjectSpec(); |
92 | 92 | } |
93 | 93 |