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 2 locations

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

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

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

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