@@ -23,9 +23,7 @@ class ClassType
2323 use Traits \CommentAware;
2424
2525 const TYPE_CLASS = 'class ' ;
26-
2726 const TYPE_INTERFACE = 'interface ' ;
28-
2927 const TYPE_TRAIT = 'trait ' ;
3028
3129 /** @var PhpNamespace|NULL */
@@ -99,15 +97,15 @@ public function __toString()
9997 foreach ($ this ->consts as $ const ) {
10098 $ consts [] = Helpers::formatDocComment ($ const ->getComment ())
10199 . ($ const ->getVisibility () ? $ const ->getVisibility () . ' ' : '' )
102- . 'const ' . $ const ->getName () . ' = ' . Helpers::dump ($ const ->getValue ()) . " ; \n" ;
100+ . 'const ' . $ const ->getName () . ' = ' . Helpers::dump ($ const ->getValue ()) . ' ; ' ;
103101 }
104102
105103 $ properties = [];
106104 foreach ($ this ->properties as $ property ) {
107105 $ properties [] = Helpers::formatDocComment ($ property ->getComment ())
108106 . ($ property ->getVisibility () ?: 'public ' ) . ($ property ->isStatic () ? ' static ' : '' ) . ' $ ' . $ property ->getName ()
109107 . ($ property ->value === NULL ? '' : ' = ' . Helpers::dump ($ property ->value ))
110- . " ; \n" ;
108+ . ' ; ' ;
111109 }
112110
113111 $ mapper = function (array $ arr ) {
@@ -124,8 +122,8 @@ public function __toString()
124122 . ($ this ->name ? "\n" : '' ) . "{ \n"
125123 . Strings::indent (
126124 ($ this ->traits ? implode ("\n" , $ traits ) . "\n\n" : '' )
127- . ($ this ->consts ? implode ('' , $ consts ) . "\n" : '' )
128- . ($ this ->properties ? implode ("\n" , $ properties ) . "\n" : '' )
125+ . ($ this ->consts ? implode ("\n" , $ consts ) . "\n \n" : '' )
126+ . ($ this ->properties ? implode ("\n\n " , $ properties ) . "\n \n" : '' )
129127 . ($ this ->methods ? "\n" . implode ("\n\n\n" , $ this ->methods ) . "\n\n" : '' ), 1 )
130128 . '} '
131129 ) . ($ this ->name ? "\n" : '' );
0 commit comments