@@ -51,7 +51,7 @@ public function generateInterfaceAnnotations(Class_ $class): array
5151 public function generateConstantAnnotations (Constant $ constant ): array
5252 {
5353 $ annotations = $ this ->formatDoc ($ constant ->comment (), true );
54- $ annotations [0 ] = sprintf ('@var string %s ' , $ this ->escapePhpDoc ($ annotations [0 ]));
54+ $ annotations [0 ] = \ sprintf ('@var string %s ' , $ this ->escapePhpDoc ($ annotations [0 ]));
5555
5656 return $ annotations ;
5757 }
@@ -62,14 +62,14 @@ public function generatePropertyAnnotations(Property $property, string $classNam
6262
6363 $ annotations = [];
6464 if ($ this ->isDocUseful ($ property ) && $ phpDocType = $ this ->toPhpDocType ($ property )) {
65- $ annotations [] = sprintf ('@var %s %s ' , $ phpDocType , $ this ->escapePhpDoc ($ description [0 ]));
65+ $ annotations [] = \ sprintf ('@var %s %s ' , $ phpDocType , $ this ->escapePhpDoc ($ description [0 ]));
6666 } else {
6767 $ annotations = $ description ;
6868 $ annotations [] = '' ;
6969 }
7070
7171 if (null !== $ property ->rdfType ()) {
72- $ annotations [] = sprintf ('@see %s ' , $ property ->rdfType ());
72+ $ annotations [] = \ sprintf ('@see %s ' , $ property ->rdfType ());
7373 }
7474
7575 $ annotations [] = '' ;
@@ -83,7 +83,7 @@ public function generateGetterAnnotations(Property $property): array
8383 return [];
8484 }
8585
86- return [sprintf ('@return %s ' , $ this ->toPhpDocType ($ property ))];
86+ return [\ sprintf ('@return %s ' , $ this ->toPhpDocType ($ property ))];
8787 }
8888
8989 public function generateSetterAnnotations (Property $ property ): array
@@ -92,7 +92,7 @@ public function generateSetterAnnotations(Property $property): array
9292 return [];
9393 }
9494
95- return [sprintf ('@param %s $%s ' , $ this ->toPhpDocType ($ property ), $ property ->name ())];
95+ return [\ sprintf ('@param %s $%s ' , $ this ->toPhpDocType ($ property ), $ property ->name ())];
9696 }
9797
9898 public function generateAdderAnnotations (Property $ property ): array
@@ -101,7 +101,7 @@ public function generateAdderAnnotations(Property $property): array
101101 return [];
102102 }
103103
104- return [sprintf ('@param %s $%s ' , $ this ->toPhpDocType ($ property , true ), $ this ->inflector ->singularize ($ property ->name ())[0 ])];
104+ return [\ sprintf ('@param %s $%s ' , $ this ->toPhpDocType ($ property , true ), $ this ->inflector ->singularize ($ property ->name ())[0 ])];
105105 }
106106
107107 public function generateRemoverAnnotations (Property $ property ): array
@@ -110,7 +110,7 @@ public function generateRemoverAnnotations(Property $property): array
110110 return [];
111111 }
112112
113- return [sprintf ('@param %s $%s ' , $ this ->toPhpDocType ($ property , true ), $ this ->inflector ->singularize ($ property ->name ())[0 ])];
113+ return [\ sprintf ('@param %s $%s ' , $ this ->toPhpDocType ($ property , true ), $ this ->inflector ->singularize ($ property ->name ())[0 ])];
114114 }
115115
116116 private function isDocUseful (Property $ property , bool $ adderOrRemover = false ): bool
@@ -138,12 +138,12 @@ private function generateDoc(Class_ $class, bool $interface = false): array
138138 $ annotations [] = '' ;
139139 }
140140 if ($ class ->rdfType ()) {
141- $ annotations [] = sprintf ('@see %s ' , $ class ->rdfType ());
141+ $ annotations [] = \ sprintf ('@see %s ' , $ class ->rdfType ());
142142 }
143143 }
144144
145145 if ($ this ->config ['author ' ]) {
146- $ annotations [] = sprintf ('@author %s ' , $ this ->config ['author ' ]);
146+ $ annotations [] = \ sprintf ('@author %s ' , $ this ->config ['author ' ]);
147147 }
148148
149149 return $ annotations ;
@@ -197,10 +197,10 @@ protected function toPhpDocType(Property $property, bool $adderOrRemover = false
197197 }
198198
199199 if ($ this ->config ['doctrine ' ]['useCollection ' ]) {
200- return sprintf ('Collection<%s>%s ' , $ phpDocType , $ suffix );
200+ return \ sprintf ('Collection<%s>%s ' , $ phpDocType , $ suffix );
201201 }
202202
203- return sprintf ('%s[]%s ' , $ phpDocType , $ suffix );
203+ return \ sprintf ('%s[]%s ' , $ phpDocType , $ suffix );
204204 }
205205
206206 private function escapePhpDoc (string $ text ): string
0 commit comments