src/Yggdrasil/Utils/Entity/EntityGenerator.php
private function generateMethods(): EntityGenerator
    {
        $this->entityClass
            ->addMethod('getId')
            ->setVisibility('public')
            ->addComment('Returns ' . strtolower($this->entityData['class']) . ' ID' . PHP_EOL)
            ->addComment('@return int')
            ->addBody('return $this->id;')
            ->setReturnType('int');

        foreach ($this->entityData['properties'] as $name => $type) {
            $this
                ->generateGetter($name, $type)
                ->generateSetter($name, $type);
        }

        return $this;
    }
private function generateMethods(): EntityGenerator
    {
        $this->entityClass
            ->addMethod('getId')
            ->setVisibility('public')
            ->addComment('Returns ' . strtolower($this->entityData['class']) . ' ID' . PHP_EOL)
            ->addComment('@return int')
            ->addBody('return $this->id;')
            ->setReturnType('int');

        foreach ($this->entityData['properties'] as $name => $type) {
            $this
                ->generateGetter($name, $type)
                ->generateSetter($name, $type);
        }

        return $this;
    }
private function generateMethods ( ) : EntityGenerator { $ this -> entityClass -> addMethod ( 'getId' ) -> setVisibility ( 'public' ) -> addComment ( 'Returns ' . strtolower ( $ this -> entityData [ 'class' ] ) . ' ID' . PHP_EOL ) -> addComment ( '@return int' ) -> addBody ( 'return $this->id;' ) -> setReturnType ( 'int' ) ; foreach ( $ this -> entityData [ 'properties' ] as $ name => $ type ) { $ this -> generateGetter ( $ name , $ type ) -> generateSetter ( $ name , $ type ) ; } return $ this ; }
Generates entity methods

@return EntityGenerator
Generates entity methods