@@ -53,6 +53,7 @@ class PhpDumper extends Dumper
53
53
private $ reservedVariables = array ('instance ' , 'class ' );
54
54
private $ targetDirRegex ;
55
55
private $ targetDirMaxMatches ;
56
+ private $ docStar ;
56
57
57
58
/**
58
59
* @var \Symfony\Component\DependencyInjection\LazyProxy\PhpDumper\DumperInterface
@@ -97,7 +98,9 @@ public function dump(array $options = array())
97
98
$ options = array_merge (array (
98
99
'class ' => 'ProjectServiceContainer ' ,
99
100
'base_class ' => 'Container ' ,
101
+ 'debug ' => true ,
100
102
), $ options );
103
+ $ this ->docStar = $ options ['debug ' ] ? '* ' : '' ;
101
104
102
105
if (!empty ($ options ['file ' ]) && is_dir ($ dir = dirname ($ options ['file ' ]))) {
103
106
// Build a regexp where the first root dirs are mandatory,
@@ -223,6 +226,9 @@ private function addProxyClasses()
223
226
foreach ($ definitions as $ definition ) {
224
227
$ code .= "\n" .$ this ->getProxyDumper ()->getProxyCode ($ definition );
225
228
}
229
+ if ('' === $ this ->docStar ) {
230
+ $ code = str_replace ('/** ' , '/* ' , $ code );
231
+ }
226
232
227
233
return $ code ;
228
234
}
@@ -589,7 +595,7 @@ private function addService($id, $definition)
589
595
$ visibility = $ isProxyCandidate ? 'public ' : 'protected ' ;
590
596
$ code = <<<EOF
591
597
592
- /**
598
+ /* { $ this -> docStar }
593
599
* Gets the ' $ id' service. $ doc
594
600
* $ lazyInitializationDoc
595
601
* $ return
@@ -699,7 +705,7 @@ private function addServiceSynchronizer($id, Definition $definition)
699
705
700
706
return <<<EOF
701
707
702
- /**
708
+ /* { $ this -> docStar }
703
709
* Updates the ' $ id' service.
704
710
*/
705
711
protected function synchronize {$ this ->camelize ($ id )}Service()
@@ -760,7 +766,7 @@ private function startClass($class, $baseClass)
760
766
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
761
767
$ bagClass
762
768
763
- /**
769
+ /* { $ this -> docStar }
764
770
* $ class.
765
771
*
766
772
* This class has been auto-generated
@@ -786,7 +792,7 @@ private function addConstructor()
786
792
787
793
$ code = <<<EOF
788
794
789
- /**
795
+ /* { $ this -> docStar }
790
796
* Constructor.
791
797
*/
792
798
public function __construct()
@@ -823,7 +829,7 @@ private function addFrozenConstructor()
823
829
824
830
$ code = <<<EOF
825
831
826
- /**
832
+ /* { $ this -> docStar }
827
833
* Constructor.
828
834
*/
829
835
public function __construct()
@@ -970,11 +976,14 @@ public function getParameterBag()
970
976
return $this->parameterBag;
971
977
}
972
978
EOF;
979
+ if ('' === $ this ->docStar ) {
980
+ $ code = str_replace ('/** ' , '/* ' , $ code );
981
+ }
973
982
}
974
983
975
984
$ code .= <<<EOF
976
985
977
- /**
986
+ /* { $ this -> docStar }
978
987
* Gets the default parameters.
979
988
*
980
989
* @return array An array of the default parameters
0 commit comments