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

src/Mapper/GuardInvalidArgumentsForExifTrait.php 1 location

@@ 25-54 (lines=30) @@
22
 * @category    PHPExif
23
 * @package     Common
24
 */
25
trait GuardInvalidArgumentsForExifTrait
26
{
27
    /**
28
     * Guard function for invalid arguments
29
     *
30
     * @codeCoverageIgnore
31
     *
32
     * @param string $field
33
     * @param array $input
34
     * @param object $output
35
     *
36
     * @throws UnsupportedFieldException when asked to map an unsupported field
37
     * @throws UnsupportedOutputException when asked to map data on an unsupported output object
38
     *
39
     * @return void
40
     */
41
    private function guardInvalidArguments($field, array $input, $output)
42
    {
43
        if (!in_array($field, $this->getSupportedFields())) {
44
            throw UnsupportedFieldException::forField($field);
45
        }
46
47
        if (!($output instanceof ExifInterface)) {
48
            throw UnsupportedOutputException::forOutput($output);
49
        }
50
    }
51
52
    /**
53
     * {@inheritDoc}
54
     */
55
    abstract public function getSupportedFields();
56
}
57

src/Mapper/GuardInvalidArgumentsForIptcTrait.php 1 location

@@ 25-54 (lines=30) @@
22
 * @category    PHPExif
23
 * @package     Common
24
 */
25
trait GuardInvalidArgumentsForIptcTrait
26
{
27
    /**
28
     * Guard function for invalid arguments
29
     *
30
     * @codeCoverageIgnore
31
     *
32
     * @param string $field
33
     * @param array $input
34
     * @param object $output
35
     *
36
     * @throws UnsupportedFieldException when asked to map an unsupported field
37
     * @throws UnsupportedOutputException when asked to map data on an unsupported output object
38
     *
39
     * @return void
40
     */
41
    private function guardInvalidArguments($field, array $input, $output)
42
    {
43
        if (!in_array($field, $this->getSupportedFields())) {
44
            throw UnsupportedFieldException::forField($field);
45
        }
46
47
        if (!($output instanceof IptcInterface)) {
48
            throw UnsupportedOutputException::forOutput($output);
49
        }
50
    }
51
52
    /**
53
     * {@inheritDoc}
54
     */
55
    abstract public function getSupportedFields();
56
}
57