Last active
January 2, 2016 03:50
-
-
Save harikt/7d9aadc9ed769acd1d67 to your computer and use it in GitHub Desktop.
When there is no double star `/**` it is no more a doc comment, but comment only.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @Entity @Table(name="products") | |
*/ | |
class Product | |
{ | |
/** | |
* @Id @Column(type="integer") | |
* @GeneratedValue | |
* @var int | |
*/ | |
protected $id; | |
/* | |
* @Column(type="string") | |
* @var string | |
*/ | |
protected $name; | |
public function getId() | |
{ | |
return $this->id; | |
} | |
public function getName() | |
{ | |
return $this->name; | |
} | |
public function setName($name) | |
{ | |
$this->name = $name; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I did asked the question on twitter : https://twitter.com/harikt/status/682972117785169924
Thank you Jonathan H. Wage and Damon Jones
The answer is : Without the double asterisk, it’s just a block comment. Annotations are parsed from docblocks only.
http://php.net/manual/en/reflectionclass.getdoccomment.php#99938