| Conditions | 2 |
| Paths | 2 |
| Total Lines | 19 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 11 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 25 | 1 | public function __construct(Traversable $reference) |
|
| 26 | { |
||
| 27 | $elements = [ |
||
| 28 | 1 | new FragmentInjection( |
|
| 29 | 1 | 'http://schemas.xmlsoap.org/soap/envelope/', |
|
| 30 | 1 | 'Header', |
|
| 31 | 1 | '<repr:representedParty xmlns:repr="http://x-road.eu/xsd/representation.xsd"/>' |
|
| 32 | ), |
||
| 33 | ]; |
||
| 34 | |||
| 35 | 1 | foreach ($reference as $name => $value) { |
|
| 36 | 1 | $elements[] = new DOMElementInjection( |
|
| 37 | 1 | 'http://x-road.eu/xsd/representation.xsd', |
|
| 38 | 1 | 'representedParty', |
|
| 39 | 1 | new \DOMElement($name, $value, 'http://x-road.eu/xsd/representation.xsd') |
|
| 40 | ); |
||
| 41 | } |
||
| 42 | |||
| 43 | 1 | parent::__construct(...$elements); |
|
| 44 | 1 | } |
|
| 46 |