GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — develop ( fa0311...41a94d )
by Tom Van
24s
created

Iptc::withKeywords()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 7
c 0
b 0
f 0
rs 9.4285
cc 1
eloc 4
nc 1
nop 1
1
<?php
2
/**
3
 * Iptc: A container class for IPTC data
4
 *
5
 * @link        http://github.com/PHPExif/php-exif-common for the canonical source repository
6
 * @copyright   Copyright (c) 2016 Tom Van Herreweghe <[email protected]>
7
 * @license     http://github.com/PHPExif/php-exif-common/blob/master/LICENSE MIT License
8
 * @category    PHPExif
9
 * @package     Common
10
 */
11
12
namespace PHPExif\Common\Data;
13
14
use PHPExif\Common\Collection\Collection;
15
use PHPExif\Common\Data\ValueObject\Caption;
16
use PHPExif\Common\Data\ValueObject\Copyright;
17
use PHPExif\Common\Data\ValueObject\Credit;
18
use PHPExif\Common\Data\ValueObject\Headline;
19
use PHPExif\Common\Data\ValueObject\Title;
20
21
/**
22
 * Iptc class
23
 *
24
 * Container for IPTC data
25
 *
26
 * @category    PHPExif
27
 * @package     Common
28
 */
29
class Iptc implements IptcInterface
30
{
31
    /**
32
     * @var Caption
33
     */
34
    protected $caption;
35
36
    /**
37
     * @var Copyright
38
     */
39
    protected $copyright;
40
41
    /**
42
     * @var Credit
43
     */
44
    protected $credit;
45
46
    /**
47
     * @var Headline
48
     */
49
    protected $headline;
50
51
    /**
52
     * @var Title
53
     */
54
    protected $title;
55
56
    /**
57
     * @var Collection
58
     */
59
    protected $keywords;
60
61
    /**
62
     * Contains the mapping of names to IPTC field numbers
63
     *
64
     * @var array
65
     */
66
    public static $iptcMapping = array(
67
        'jobtitle'  => '2#085',
68
        'keywords'  => '2#025',
69
        'source'    => '2#115',
70
    );
71
72
    /**
73
     * {@inheritDoc}
74
     */
75
    public function getHeadline()
76
    {
77
        return $this->headline;
78
    }
79
80
    /**
81
     * {@inheritDoc}
82
     */
83
    public function withHeadline(Headline $headline)
84
    {
85
        $new = clone $this;
86
        $new->headline = $headline;
87
88
        return $new;
89
    }
90
91
    /**
92
     * {@inheritDoc}
93
     */
94
    public function getCredit()
95
    {
96
        return $this->credit;
97
    }
98
99
    /**
100
     * {@inheritDoc}
101
     */
102
    public function withCredit(Credit $credit)
103
    {
104
        $new = clone $this;
105
        $new->credit = $credit;
106
107
        return $new;
108
    }
109
110
    /**
111
     * {@inheritDoc}
112
     */
113
    public function getCopyright()
114
    {
115
        return $this->copyright;
116
    }
117
118
    /**
119
     * {@inheritDoc}
120
     */
121
    public function withCopyright(Copyright $copyright)
122
    {
123
        $new = clone $this;
124
        $new->copyright = $copyright;
125
126
        return $new;
127
    }
128
129
    /**
130
     * {@inheritDoc}
131
     */
132
    public function getCaption()
133
    {
134
        return $this->caption;
135
    }
136
137
    /**
138
     * {@inheritDoc}
139
     */
140
    public function withCaption(Caption $caption)
141
    {
142
        $new = clone $this;
143
        $new->caption = $caption;
144
145
        return $new;
146
    }
147
148
    /**
149
     * {@inheritDoc}
150
     */
151
    public function getTitle()
152
    {
153
        return $this->title;
154
    }
155
156
    /**
157
     * {@inheritDoc}
158
     */
159
    public function withTitle(Title $title)
160
    {
161
        $new = clone $this;
162
        $new->title = $title;
163
164
        return $new;
165
    }
166
167
    /**
168
     * {@inheritDoc}
169
     */
170
    public function getKeywords()
171
    {
172
        return $this->keywords;
173
    }
174
175
    /**
176
     * {@inheritDoc}
177
     */
178
    public function withKeywords(Collection $keywords)
179
    {
180
        $new = clone $this;
181
        $new->keywords = $keywords;
182
183
        return $new;
184
    }
185
}
186