@@ -23,9 +23,7 @@ class ClassType
23
23
use Traits \CommentAware;
24
24
25
25
const TYPE_CLASS = 'class ' ;
26
-
27
26
const TYPE_INTERFACE = 'interface ' ;
28
-
29
27
const TYPE_TRAIT = 'trait ' ;
30
28
31
29
/** @var PhpNamespace|NULL */
@@ -99,15 +97,15 @@ public function __toString()
99
97
foreach ($ this ->consts as $ const ) {
100
98
$ consts [] = Helpers::formatDocComment ($ const ->getComment ())
101
99
. ($ const ->getVisibility () ? $ const ->getVisibility () . ' ' : '' )
102
- . 'const ' . $ const ->getName () . ' = ' . Helpers::dump ($ const ->getValue ()) . " ; \n" ;
100
+ . 'const ' . $ const ->getName () . ' = ' . Helpers::dump ($ const ->getValue ()) . ' ; ' ;
103
101
}
104
102
105
103
$ properties = [];
106
104
foreach ($ this ->properties as $ property ) {
107
105
$ properties [] = Helpers::formatDocComment ($ property ->getComment ())
108
106
. ($ property ->getVisibility () ?: 'public ' ) . ($ property ->isStatic () ? ' static ' : '' ) . ' $ ' . $ property ->getName ()
109
107
. ($ property ->value === NULL ? '' : ' = ' . Helpers::dump ($ property ->value ))
110
- . " ; \n" ;
108
+ . ' ; ' ;
111
109
}
112
110
113
111
$ mapper = function (array $ arr ) {
@@ -124,8 +122,8 @@ public function __toString()
124
122
. ($ this ->name ? "\n" : '' ) . "{ \n"
125
123
. Strings::indent (
126
124
($ 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" : '' )
129
127
. ($ this ->methods ? "\n" . implode ("\n\n\n" , $ this ->methods ) . "\n\n" : '' ), 1 )
130
128
. '} '
131
129
) . ($ this ->name ? "\n" : '' );
0 commit comments