Completed
Pull Request — master (#489)
by Milroy
02:55
created

Book::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 7
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 4
1
<?php namespace League\Fractal\Test\Dto;
2
3
class Book
4
{
5
    public $title;
6
    public $year;
7
    public $author;
8
    public $meta;
9
10
    public function __construct($title, $year, Person $author = null, array $meta = null)
11
    {
12
        $this->title = $title;
13
        $this->year = $year;
14
        $this->author = $author;
15
        $this->meta = $meta;
16
    }
17
18
    public static function make($title, $year, Person $author = null, array $meta = null)
19
    {
20
        return new self($title, $year, $author, $meta);
21
    }
22
}
23