diff --git a/bin/src/Generator/GeneratorParser.php b/bin/src/Generator/GeneratorParser.php index 53e6ff2..40eaade 100644 --- a/bin/src/Generator/GeneratorParser.php +++ b/bin/src/Generator/GeneratorParser.php @@ -25,11 +25,6 @@ class GeneratorParser extends AbstractGenerator implements GeneratorInterface */ private $properties = []; - /** - * @var bool - */ - private $isFinalPropertyArray = false; - /** * @param string $name * @return string @@ -42,8 +37,7 @@ public function generateClass($name) $name, implode(",\n", $this->properties), $name, - $name, - $this->isFinalPropertyArray ? $this->getTemplate('Parser/ParserCallParse') : '' + $name ); } @@ -53,7 +47,6 @@ public function generateClass($name) public function addProperty(DefinitionProperty $property) { $this->properties[] = sprintf(" '%s'", lcfirst($property->getName())); - $this->isFinalPropertyArray = $property->getType() == DefinitionProperty::PROPERTY_TYPE_ARRAY; } /** diff --git a/bin/src/Generator/Template/Parser/ParserCallParse.php.tpl b/bin/src/Generator/Template/Parser/ParserCallParse.php.tpl deleted file mode 100644 index d358a88..0000000 --- a/bin/src/Generator/Template/Parser/ParserCallParse.php.tpl +++ /dev/null @@ -1,12 +0,0 @@ - - - /** - * @param string $string - * @return Graze\UnicontrollerClient\Entity\Entity\EntityInterface - */ - public function parse($string) - { - // to make parsing easier, "\r\n," is used as the end token for an array - // as this response ends with an array, the final ',' is missing, add it here - return parent::parse($string . ', '); - } diff --git a/bin/src/Generator/Template/Parser/ParserClass.php.tpl b/bin/src/Generator/Template/Parser/ParserClass.php.tpl index ea79de8..0b26bde 100644 --- a/bin/src/Generator/Template/Parser/ParserClass.php.tpl +++ b/bin/src/Generator/Template/Parser/ParserClass.php.tpl @@ -34,5 +34,5 @@ class Parser%s extends AbstractParser implements ParserInterface protected function getEntity() { return new Entity%s(); - }%s + } }