@@ -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,
@@ -589,7 +592,7 @@ private function addService($id, $definition)
589
592
$ visibility = $ isProxyCandidate ? 'public ' : 'protected ' ;
590
593
$ code = <<<EOF
591
594
592
- /**
595
+ /* { $ this -> docStar }
593
596
* Gets the ' $ id' service. $ doc
594
597
* $ lazyInitializationDoc
595
598
* $ return
@@ -699,7 +702,7 @@ private function addServiceSynchronizer($id, Definition $definition)
699
702
700
703
return <<<EOF
701
704
702
- /**
705
+ /* { $ this -> docStar }
703
706
* Updates the ' $ id' service.
704
707
*/
705
708
protected function synchronize {$ this ->camelize ($ id )}Service()
@@ -760,7 +763,7 @@ private function startClass($class, $baseClass)
760
763
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
761
764
$ bagClass
762
765
763
- /**
766
+ /* { $ this -> docStar }
764
767
* $ class.
765
768
*
766
769
* This class has been auto-generated
@@ -786,7 +789,7 @@ private function addConstructor()
786
789
787
790
$ code = <<<EOF
788
791
789
- /**
792
+ /* { $ this -> docStar }
790
793
* Constructor.
791
794
*/
792
795
public function __construct()
@@ -823,7 +826,7 @@ private function addFrozenConstructor()
823
826
824
827
$ code = <<<EOF
825
828
826
- /**
829
+ /* { $ this -> docStar }
827
830
* Constructor.
828
831
*/
829
832
public function __construct()
@@ -970,11 +973,14 @@ public function getParameterBag()
970
973
return $this->parameterBag;
971
974
}
972
975
EOF;
976
+ if ($ this ->docStar ) {
977
+ $ code = str_replace ('/** ' , '/* ' , $ code );
978
+ }
973
979
}
974
980
975
981
$ code .= <<<EOF
976
982
977
- /**
983
+ /* { $ this -> docStar }
978
984
* Gets the default parameters.
979
985
*
980
986
* @return array An array of the default parameters
0 commit comments