Skip to content

Commit

Permalink
Remove hacky Parser Generation code now Parser works properly
Browse files Browse the repository at this point in the history
  • Loading branch information
john-n-smith committed Nov 18, 2016
1 parent 8fae9a7 commit 44564d2
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 21 deletions.
9 changes: 1 addition & 8 deletions bin/src/Generator/GeneratorParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,6 @@ class GeneratorParser extends AbstractGenerator implements GeneratorInterface
*/
private $properties = [];

/**
* @var bool
*/
private $isFinalPropertyArray = false;

/**
* @param string $name
* @return string
Expand All @@ -42,8 +37,7 @@ public function generateClass($name)
$name,
implode(",\n", $this->properties),
$name,
$name,
$this->isFinalPropertyArray ? $this->getTemplate('Parser/ParserCallParse') : ''
$name
);
}

Expand All @@ -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;
}

/**
Expand Down
12 changes: 0 additions & 12 deletions bin/src/Generator/Template/Parser/ParserCallParse.php.tpl

This file was deleted.

2 changes: 1 addition & 1 deletion bin/src/Generator/Template/Parser/ParserClass.php.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@ class Parser%s extends AbstractParser implements ParserInterface
protected function getEntity()
{
return new Entity%s();
}%s
}
}

0 comments on commit 44564d2

Please sign in to comment.