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.

Code Duplication    Length = 33-33 lines in 3 locations

src/Reader/Mapper/Exif/ApertureFieldMapper.php 1 location

@@ 24-56 (lines=33) @@
21
 * @category    PHPExif
22
 * @package     Native
23
 */
24
class ApertureFieldMapper implements FieldMapper
25
{
26
    use GuardInvalidArgumentsTrait;
27
28
    /**
29
     * {@inheritDoc}
30
     */
31
    public function getSupportedFields()
32
    {
33
        return array(
34
            Aperture::class,
35
        );
36
    }
37
38
    /**
39
     * {@inheritDoc}
40
     */
41
    public function mapField($field, array $input, &$output)
42
    {
43
        $this->guardInvalidArguments($field, $input, $output);
44
45
        if (!array_key_exists('COMPUTED', $input)
46
            || !array_key_exists('ApertureFNumber', $input['COMPUTED'])) {
47
            return;
48
        }
49
50
        $aperture = Aperture::fromFocalLength(
51
            $input['COMPUTED']['ApertureFNumber']
52
        );
53
54
        $output = $output->withAperture($aperture);
55
    }
56
}
57

src/Reader/Mapper/Exif/HeightFieldMapper.php 1 location

@@ 24-56 (lines=33) @@
21
 * @category    PHPExif
22
 * @package     Native
23
 */
24
class HeightFieldMapper implements FieldMapper
25
{
26
    use GuardInvalidArgumentsTrait;
27
28
    /**
29
     * {@inheritDoc}
30
     */
31
    public function getSupportedFields()
32
    {
33
        return array(
34
            Height::class,
35
        );
36
    }
37
38
    /**
39
     * {@inheritDoc}
40
     */
41
    public function mapField($field, array $input, &$output)
42
    {
43
        $this->guardInvalidArguments($field, $input, $output);
44
45
        if (!array_key_exists('COMPUTED', $input)
46
            || !array_key_exists('Height', $input['COMPUTED'])) {
47
            return;
48
        }
49
50
        $height = new Height(
51
            (int) $input['COMPUTED']['Height']
52
        );
53
54
        $output = $output->withHeight($height);
55
    }
56
}
57

src/Reader/Mapper/Exif/WidthFieldMapper.php 1 location

@@ 24-56 (lines=33) @@
21
 * @category    PHPExif
22
 * @package     Native
23
 */
24
class WidthFieldMapper implements FieldMapper
25
{
26
    use GuardInvalidArgumentsTrait;
27
28
    /**
29
     * {@inheritDoc}
30
     */
31
    public function getSupportedFields()
32
    {
33
        return array(
34
            Width::class,
35
        );
36
    }
37
38
    /**
39
     * {@inheritDoc}
40
     */
41
    public function mapField($field, array $input, &$output)
42
    {
43
        $this->guardInvalidArguments($field, $input, $output);
44
45
        if (!array_key_exists('COMPUTED', $input)
46
            || !array_key_exists('Width', $input['COMPUTED'])) {
47
            return;
48
        }
49
50
        $width = new Width(
51
            (int) $input['COMPUTED']['Width']
52
        );
53
54
        $output = $output->withWidth($width);
55
    }
56
}
57