Merge pull request #363 from gajdaw/entities_generator_cs_fix
Entities generator: constructor's template docblock
This commit is contained in:
commit
e8ad82c80f
@ -37,7 +37,7 @@ use Doctrine\ORM\Mapping\ClassMetadataInfo,
|
|||||||
* $generator->setUpdateEntityIfExists(true);
|
* $generator->setUpdateEntityIfExists(true);
|
||||||
* $generator->generate($classes, '/path/to/generate/entities');
|
* $generator->generate($classes, '/path/to/generate/entities');
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* @link www.doctrine-project.org
|
* @link www.doctrine-project.org
|
||||||
* @since 2.0
|
* @since 2.0
|
||||||
* @author Benjamin Eberlei <kontakt@beberlei.de>
|
* @author Benjamin Eberlei <kontakt@beberlei.de>
|
||||||
@ -235,7 +235,10 @@ public function <methodName>()
|
|||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
private static $constructorMethodTemplate =
|
private static $constructorMethodTemplate =
|
||||||
'public function __construct()
|
'/**
|
||||||
|
* Constructor
|
||||||
|
*/
|
||||||
|
public function __construct()
|
||||||
{
|
{
|
||||||
<spaces><collections>
|
<spaces><collections>
|
||||||
}
|
}
|
||||||
@ -975,10 +978,10 @@ public function <methodName>()
|
|||||||
|
|
||||||
if ($this->generateAnnotations) {
|
if ($this->generateAnnotations) {
|
||||||
$lines[] = $this->spaces . ' *';
|
$lines[] = $this->spaces . ' *';
|
||||||
|
|
||||||
if (isset($associationMapping['id']) && $associationMapping['id']) {
|
if (isset($associationMapping['id']) && $associationMapping['id']) {
|
||||||
$lines[] = $this->spaces . ' * @' . $this->annotationsPrefix . 'Id';
|
$lines[] = $this->spaces . ' * @' . $this->annotationsPrefix . 'Id';
|
||||||
|
|
||||||
if ($generatorType = $this->getIdGeneratorTypeString($metadata->generatorType)) {
|
if ($generatorType = $this->getIdGeneratorTypeString($metadata->generatorType)) {
|
||||||
$lines[] = $this->spaces . ' * @' . $this->annotationsPrefix . 'GeneratedValue(strategy="' . $generatorType . '")';
|
$lines[] = $this->spaces . ' * @' . $this->annotationsPrefix . 'GeneratedValue(strategy="' . $generatorType . '")';
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user