Conditions | 3 |
Paths | 3 |
Total Lines | 14 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 12 |
Changes | 2 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
36 | public function doRequest() |
||
37 | { |
||
38 | $document = $this->buildXml(); |
||
39 | $valid = $this->validateByXsd($document); |
||
40 | |||
41 | if (!$valid) { |
||
42 | $errstr = ''; |
||
43 | $errors = libxml_get_errors(); |
||
44 | foreach ($errors as $error) { |
||
45 | $errstr .= $error->message.'\n'; |
||
46 | } |
||
47 | throw new InvalidRequestException('Request document failed validation: '.$errstr); |
||
48 | } |
||
49 | } |
||
50 | |||
59 |