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

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

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

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

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

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

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

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

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

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

@@ 25-54 (lines=30) @@
22
 * @category    PHPExif
23
 * @package     Native
24
 */
25
class IsoFieldMapper implements FieldMapper
26
{
27
    use GuardInvalidArgumentsForExifTrait;
28
29
    /**
30
     * {@inheritDoc}
31
     */
32
    public function getSupportedFields()
33
    {
34
        return array(
35
            IsoSpeed::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('isospeedratings', $input)) {
47
            return;
48
        }
49
50
        $iso = new IsoSpeed((int) $input['isospeedratings']);
51
52
        $output = $output->withIsoSpeed($iso);
53
    }
54
}
55

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

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

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

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

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

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

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

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