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 = 30-30 lines in 4 locations

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

@@ 24-53 (lines=30) @@
21
 * @category    PHPExif
22
 * @package     Native
23
 */
24
class FilenameFieldMapper implements FieldMapper
25
{
26
    use GuardInvalidArgumentsTrait;
27
28
    /**
29
     * {@inheritDoc}
30
     */
31
    public function getSupportedFields()
32
    {
33
        return array(
34
            Filename::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('FileName', $input)) {
46
            return;
47
        }
48
49
        $filename = new Filename($input['FileName']);
50
51
        $output = $output->withFilename($filename);
52
    }
53
}
54

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

@@ 24-53 (lines=30) @@
21
 * @category    PHPExif
22
 * @package     Native
23
 */
24
class FilesizeFieldMapper implements FieldMapper
25
{
26
    use GuardInvalidArgumentsTrait;
27
28
    /**
29
     * {@inheritDoc}
30
     */
31
    public function getSupportedFields()
32
    {
33
        return array(
34
            Filesize::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('FileSize', $input)) {
46
            return;
47
        }
48
49
        $filesize = new Filesize($input['FileSize']);
50
51
        $output = $output->withFilesize($filesize);
52
    }
53
}
54

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

@@ 24-53 (lines=30) @@
21
 * @category    PHPExif
22
 * @package     Native
23
 */
24
class MakeFieldMapper implements FieldMapper
25
{
26
    use GuardInvalidArgumentsTrait;
27
28
    /**
29
     * {@inheritDoc}
30
     */
31
    public function getSupportedFields()
32
    {
33
        return array(
34
            Make::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('Make', $input)) {
46
            return;
47
        }
48
49
        $make = new Make($input['Make']);
50
51
        $output = $output->withMake($make);
52
    }
53
}
54

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

@@ 24-53 (lines=30) @@
21
 * @category    PHPExif
22
 * @package     Native
23
 */
24
class MimeTypeFieldMapper implements FieldMapper
25
{
26
    use GuardInvalidArgumentsTrait;
27
28
    /**
29
     * {@inheritDoc}
30
     */
31
    public function getSupportedFields()
32
    {
33
        return array(
34
            MimeType::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('MimeType', $input)) {
46
            return;
47
        }
48
49
        $mimeType = new MimeType($input['MimeType']);
50
51
        $output = $output->withMimeType($mimeType);
52
    }
53
}
54