Failed Conditions
Pull Request — 2.6 (#7890)
by
unknown
10:05 queued 03:38
created

CmsComment::setArticle()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 2
rs 10
cc 1
nc 1
nop 1
1
<?php
2
3
namespace Doctrine\Tests\Models\CMSCustomId;
4
5
/**
6
 * @Entity
7
 * @Table(name="cms_comments_customid")
8
 */
9
class CmsComment
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="string")
23
     */
24
    public $text;
25
    /**
26
     * @ManyToOne(targetEntity="CmsArticle", inversedBy="comments")
27
     * @JoinColumn(name="article_id", referencedColumnName="id")
28
     */
29
    public $article;
30
31
    public function setArticle(CmsArticle $article) {
32
        $this->article = $article;
33
    }
34
35
    public function __toString() {
36
        return __CLASS__."[id=".$this->id."]";
37
    }
38
}
39