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 ( 13b53f...80eafd )
by Tom Van
24s
created

Metadata::jsonSerialize()   A

Complexity

Conditions 1
Paths 1

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 1
eloc 4
nc 1
nop 0
1
<?php
2
/**
3
 * Exif: A container class for EXIF 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 \JsonSerializable;
15
16
/**
17
 * Metadata class
18
 *
19
 * Container for Metadata of an image
20
 *
21
 * @category    PHPExif
22
 * @package     Common
23
 */
24
class Metadata implements MetadataInterface, JsonSerializable
25
{
26
    /**
27
     * @var ExifInterface
28
     */
29
    protected $exif;
30
31
    /**
32
     * @var IptcInterface
33
     */
34
    protected $iptc;
35
36
    /**
37
     * @var array
38
     */
39
    protected $rawData = [];
40
41
    /**
42
     * Constructor
43
     *
44
     * @param ExifInterface $exif
45
     * @param IptcInterface $iptc
46
     */
47
    public function __construct(ExifInterface $exif, IptcInterface $iptc)
48
    {
49
        $this->exif = $exif;
50
        $this->iptc = $iptc;
51
    }
52
53
    /**
54
     * {@inheritDoc}
55
     */
56
    public function setRawData(array $data)
57
    {
58
        $this->rawData = $data;
59
    }
60
61
    /**
62
     * {@inheritDoc}
63
     */
64
    public function getRawData()
65
    {
66
        return $this->rawData;
67
    }
68
69
    /**
70
     * {@inheritDoc}
71
     */
72
    public function withExif(ExifInterface $exif)
73
    {
74
        $new = clone $this;
75
        $new->exif = $exif;
76
77
        return $new;
78
    }
79
80
    /**
81
     * {@inheritDoc}
82
     */
83
    public function withIptc(IptcInterface $iptc)
84
    {
85
        $new = clone $this;
86
        $new->iptc = $iptc;
87
88
        return $new;
89
    }
90
91
    /**
92
     * {@inheritDoc}
93
     */
94
    public function getExif()
95
    {
96
        return $this->exif;
97
    }
98
99
    /**
100
     * {@inheritDoc}
101
     */
102
    public function getIptc()
103
    {
104
        return $this->iptc;
105
    }
106
107
    /**
108
     * @inheritDoc
109
     *
110
     * @return array
111
     */
112
    public function jsonSerialize()
113
    {
114
        return [
115
            'exif' => $this->getExif(),
116
            'iptc' => $this->getIptc(),
117
        ];
118
    }
119
}
120