Board::fields()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 12

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 9
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 12
ccs 9
cts 9
cp 1
rs 9.8666
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 1
1
<?php
2
3
/*
4
 * This file is part of the Pinterest PHP library.
5
 *
6
 * (c) Hans Ott <[email protected]>
7
 *
8
 * This source file is subject to the MIT license that is bundled
9
 * with this source code in the file LICENSE.md.
10
 *
11
 * Source: https://github.com/hansott/pinterest-php
12
 */
13
14
namespace Pinterest\Objects;
15
16
/**
17
 * This class represents a board.
18
 *
19
 * @author Hans Ott <[email protected]>
20
 */
21
final class Board implements BaseObject
22
{
23
    /**
24
     * The required fields.
25
     *
26
     * @return array The required fields.
27
     */
28 8
    public static function fields()
29
    {
30
        return array(
31 8
            'id',
32 4
            'name',
33 4
            'url',
34 4
            'description',
35 4
            'created_at',
36 4
            'counts',
37 4
            'image',
38 4
        );
39
    }
40
41
    /**
42
     * The boards's id.
43
     *
44
     * @var string
45
     * @required
46
     */
47
    public $id;
48
49
    /**
50
     * The name of the board.
51
     *
52
     * @var string
53
     */
54
    public $name;
55
56
    /**
57
     * The url to the object on pinterest.
58
     *
59
     * @var string
60
     */
61
    public $url;
62
63
    /**
64
     * The description of the board by the creator.
65
     *
66
     * @var string
67
     */
68
    public $description;
69
70
    /**
71
     * ISO 8601 Timestamp of creation date.
72
     *
73
     * @var \DateTime
74
     */
75
    public $created_at;
76
77
    /**
78
     * The stats/counts of the Board (pins, collaborators and followers).
79
     *
80
     * @var Stats
81
     */
82
    public $counts;
83
84
    /**
85
     * Information about the media type, including whether it's an "image" or "video"..
86
     *
87
     * @var array
88
     */
89
    public $image;
90
}
91