private function handleBody(Generator\ClassGenerator $class, PHPClass $type) { foreach ($type->getProperties() as $prop) { if ($prop->getName() !== '__value') { $this->handleProperty($class, $prop); } } foreach ($type->getProperties() as $prop) { if ($prop->getName() !== '__value') { $this->handleMethod($class, $prop, $type); } } if (count($type->getProperties()) === 1 && $type->hasProperty('__value')) { return false; } return true; }