protected function createModel(string $name, $properties, $methods, bool $hasExtensions = false): Stmt\Class_
    {
        return new Stmt\Class_(
            new Name($this->getNaming()->getClassName($name)),
            [
                'stmts' => array_merge($properties, $methods),
                'extends' => $hasExtensions ? new Name('\ArrayObject') : null,
            ]
        );
    }