Permalink
Browse files

Merge pull request #363 from gajdaw/entities_generator_cs_fix

Entities generator: constructor's template docblock
  • Loading branch information...
2 parents 8bb4f53 + b263a00 commit e8ad82c80fb3fe260e05a24e7e9ed4fc9c2c660c @guilhermeblanco guilhermeblanco committed Jun 15, 2012
Showing with 7 additions and 4 deletions.
  1. +7 −4 lib/Doctrine/ORM/Tools/EntityGenerator.php
@@ -37,7 +37,7 @@
* $generator->setUpdateEntityIfExists(true);
* $generator->generate($classes, '/path/to/generate/entities');
*
- *
+ *
* @link www.doctrine-project.org
* @since 2.0
* @author Benjamin Eberlei <kontakt@beberlei.de>
@@ -235,7 +235,10 @@ public function <methodName>()
* @var string
*/
private static $constructorMethodTemplate =
-'public function __construct()
+'/**
+ * Constructor
+ */
+public function __construct()
{
<spaces><collections>
}
@@ -975,10 +978,10 @@ private function generateAssociationMappingPropertyDocBlock(array $associationMa
if ($this->generateAnnotations) {
$lines[] = $this->spaces . ' *';
-
+
if (isset($associationMapping['id']) && $associationMapping['id']) {
$lines[] = $this->spaces . ' * @' . $this->annotationsPrefix . 'Id';
-
+
if ($generatorType = $this->getIdGeneratorTypeString($metadata->generatorType)) {
$lines[] = $this->spaces . ' * @' . $this->annotationsPrefix . 'GeneratedValue(strategy="' . $generatorType . '")';
}

0 comments on commit e8ad82c

Please sign in to comment.