diff --git a/cobertura.xml b/cobertura.xml index fc190d9..5698479 100644 --- a/cobertura.xml +++ b/cobertura.xml @@ -1,6 +1,6 @@ - + /home/thomas/projekte/calc/src @@ -6242,9 +6242,9 @@ - + - + @@ -6356,30 +6356,30 @@ - + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + @@ -6541,25 +6541,25 @@ - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + @@ -6772,37 +6772,39 @@ - + - + - + - - + + + + - - - - - - - - + + + + + + + + @@ -6811,19 +6813,21 @@ - - + + - - - - - - - - + + + + + + + + + + @@ -8462,13 +8466,13 @@ - + - + - + - + @@ -8481,9 +8485,9 @@ - + - + @@ -8491,9 +8495,9 @@ - + - + @@ -8501,9 +8505,9 @@ - + - + @@ -8511,9 +8515,9 @@ - + - + @@ -8521,25 +8525,25 @@ - + - + - + - + - + - + - + - + @@ -8660,7 +8664,7 @@ - + @@ -8670,7 +8674,7 @@ - + @@ -8680,7 +8684,7 @@ - + @@ -8734,11 +8738,11 @@ - + - + - + diff --git a/src/Option/Parser/Text.php b/src/Option/Parser/Text.php index 85dcb5f..0b114aa 100644 --- a/src/Option/Parser/Text.php +++ b/src/Option/Parser/Text.php @@ -1,4 +1,5 @@ json['dependencys']) && count($this->json['dependencys']) > 0) { + if ($this->json['default']) { + $this->element->setValue((string) $this->json['default']); + } + + if (isset($this->json['dependencys']) && count($this->json['dependencys']) > 0) { $edgeCollectionContainerParser = new EdgeCollectionContainer(); $edgeCollectionContainerParser->fromJson($this->json['dependencys']); $this->element->setEdgesCollectionContainer($edgeCollectionContainerParser->parseJson()); @@ -27,20 +31,19 @@ class Text extends Base return $this->element; } - public function parseXML(): PSCText { parent::parseXML(); - if($this->node->data) { - $this->element->setValue((string)$this->node->data); + if ($this->node->data) { + $this->element->setValue((string) $this->node->data); } - if($this->element->getDefault() != null) { + if ($this->element->getDefault() != null) { $this->element->setValue($this->element->getDefault()); } - if($this->node->children()) { + if ($this->node->children()) { $edgeCollectionContainerParser = new EdgeCollectionContainer(); $edgeCollectionContainerParser->fromXML($this->node); $this->element->setEdgesCollectionContainer($edgeCollectionContainerParser->parseXML()); @@ -48,5 +51,4 @@ class Text extends Base return $this->element; } - }