Completed
Push — master ( 721fe7...749edd )
by Park Jong-Hun
11:15 queued 08:43
created

Post::getAuthor()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 7
rs 9.4285
cc 2
eloc 4
nc 2
nop 0
1
<?php
2
3
namespace App\Entity;
4
5
use \JsonSerializable;
6
7
/**
8
 * @Entity
9
 * @Table(name="posts")
10
 */
11
class Post implements JsonSerializable
12
{
13
14
    /**
15
     * @Id
16
     * @Column(type="integer")
17
     * @GeneratedValue
18
     */
19
    protected $id;
20
21
    /**
22
     * @Column(type="string")
23
     */
24
    protected $title;
25
26
    /**
27
     * @Column(type="text", length=65535)
28
     */
29
    protected $content;
30
31
32
    public function jsonSerialize()
33
    {
34
        return [
35
            'id' => $this->id,
36
            'title' => $this->title,
37
            'content' => $this->content,
38
        ];
39
    }
40
}
41