protected function createGetter($name, Type $type, $namespace)
    {
        return new Stmt\ClassMethod(
            // getProperty
            $this->getNaming()->getPrefixedMethodName('get', $name),
            [
                // public function
                'type' => Stmt\Class_::MODIFIER_PUBLIC,
                'stmts' => [
                    // return $this->property;
                    new Stmt\Return_(
                        new Expr\PropertyFetch(new Expr\Variable('this'), $this->getNaming()->getPropertyName($name))
                    ),
                ],
            ], [
                'comments' => [$this->createGetterDoc($type, $namespace)],
            ]
        );
    }
protected function createGetter($name, Type $type, $namespace)
    {
        return new Stmt\ClassMethod(
            // getProperty
            $this->getNaming()->getPrefixedMethodName('get', $name),
            [
                // public function
                'type' => Stmt\Class_::MODIFIER_PUBLIC,
                'stmts' => [
                    // return $this->property;
                    new Stmt\Return_(
                        new Expr\PropertyFetch(new Expr\Variable('this'), $this->getNaming()->getPropertyName($name))
                    ),
                ],
            ], [
                'comments' => [$this->createGetterDoc($type, $namespace)],
            ]
        );
    }
protected function createGetter ( $ name , Type $ type , $ namespace ) { return new Stmt \ ClassMethod ( // getProperty $ this -> getNaming ( ) -> getPrefixedMethodName ( 'get' , $ name ) , [ // public function 'type' => Stmt \ Class_ :: MODIFIER_PUBLIC , 'stmts' => [ // return $this->property; new Stmt \ Return_ ( new Expr \ PropertyFetch ( new Expr \ Variable ( 'this' ) , $ this -> getNaming ( ) -> getPropertyName ( $ name ) ) ) , ] , ] , [ 'comments' => [ $ this -> createGetterDoc ( $ type , $ namespace ) ] , ] ) ; }
Create get method.

@param $name
@param Type $type
@param string $namespace

@return Stmt\ClassMethod
Create get method .