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

Book   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 20
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 1
A make() 0 4 1
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