public function denormalize(FixtureInterface $scope, FlagParserInterface $parser, array $unparsedSpecs) : SpecificationBag
{
$constructor = null;
$properties = new PropertyBag();
$calls = new MethodCallBag();
foreach ($unparsedSpecs as $unparsedPropertyName => $value) {
if ('__construct' === $unparsedPropertyName) {
$constructor = $this->denormalizeConstructor($value, $scope, $parser);
continue;
}
if ('__calls' === $unparsedPropertyName) {
$calls = $this->denormalizeCall($this->callsDenormalizer, $value, $calls, $scope, $parser);
continue;
}
$properties = $this->denormalizeProperty($this->propertyDenormalizer, $parser, $unparsedPropertyName, $value, $properties, $scope);
}
return new SpecificationBag($constructor, $properties, $calls);
}