| Total Complexity | 2 |
| Total Lines | 38 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 9 | class CmsArticle |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * @Id |
||
| 13 | * @Column(type="CustomIdObject") |
||
| 14 | * @GeneratedValue(strategy="NONE") |
||
| 15 | */ |
||
| 16 | public $id; |
||
| 17 | /** |
||
| 18 | * @Column(type="string", length=255) |
||
| 19 | */ |
||
| 20 | public $topic; |
||
| 21 | /** |
||
| 22 | * @Column(type="text") |
||
| 23 | */ |
||
| 24 | public $text; |
||
| 25 | /** |
||
| 26 | * @ManyToOne(targetEntity="CmsUser", inversedBy="articles") |
||
| 27 | * @JoinColumn(name="user_id", referencedColumnName="id") |
||
| 28 | */ |
||
| 29 | public $user; |
||
| 30 | /** |
||
| 31 | * @OneToMany(targetEntity="CmsComment", mappedBy="article") |
||
| 32 | */ |
||
| 33 | public $comments; |
||
| 34 | |||
| 35 | /** |
||
| 36 | * @Version @column(type="integer") |
||
| 37 | */ |
||
| 38 | public $version; |
||
| 39 | |||
| 40 | public function setAuthor(CmsUser $author) { |
||
| 42 | } |
||
| 43 | |||
| 44 | public function addComment(CmsComment $comment) { |
||
| 49 |