protected function createProperty($name, Type $type, $namespace, $default = null)
    {
        $propertyName = $this->getNaming()->getPropertyName($name);
        $property     = new Stmt\PropertyProperty($propertyName);

        if ($default !== null) {
            $property->default = new Expr\ConstFetch(new Name($default));
        }

        return new Stmt\Property(Stmt\Class_::MODIFIER_PROTECTED, [
            $property
        ], [
            'comments' => [$this->createPropertyDoc($type, $namespace)]
        ]);
    }
protected function createProperty($name, Type $type, $namespace, $default = null)
    {
        $propertyName = $this->getNaming()->getPropertyName($name);
        $property     = new Stmt\PropertyProperty($propertyName);

        if ($default !== null) {
            $property->default = new Expr\ConstFetch(new Name($default));
        }

        return new Stmt\Property(Stmt\Class_::MODIFIER_PROTECTED, [
            $property
        ], [
            'comments' => [$this->createPropertyDoc($type, $namespace)]
        ]);
    }
protected function createProperty ( $ name , Type $ type , $ namespace , $ default = null ) { $ propertyName = $ this -> getNaming ( ) -> getPropertyName ( $ name ) ; $ property = new Stmt \ PropertyProperty ( $ propertyName ) ; if ( $ default !== null ) { $ property -> default = new Expr \ ConstFetch ( new Name ( $ default ) ) ; } return new Stmt \ Property ( Stmt \ Class_ :: MODIFIER_PROTECTED , [ $ property ] , [ 'comments' => [ $ this -> createPropertyDoc ( $ type , $ namespace ) ] ] ) ; }
Return a property stmt

@param string      $name
@param Type        $type
@param string|null $default

@return Stmt\Property
Return a property stmt