Code Duplication    Length = 4-4 lines in 2 locations

src/Service/ReportingCloudFactory.php 2 locations

@@ 35-38 (lines=4) @@
32
            throw new InvalidArgumentException($message);
33
        }
34
35
        if (!array_key_exists('username', $config['reportingcloud']['credentials'])) {
36
            $message = "The key 'username' has not been specified under the key 'reportingcloud', sub-key 'credentials' in your application's configuration file. {$help}";
37
            throw new InvalidArgumentException($message);
38
        }
39
40
        if (!array_key_exists('password', $config['reportingcloud']['credentials'])) {
41
            $message = "The key 'password' has not been specified under the key 'reportingcloud', sub-key 'credentials' in your application's configuration file. {$help}";
@@ 40-43 (lines=4) @@
37
            throw new InvalidArgumentException($message);
38
        }
39
40
        if (!array_key_exists('password', $config['reportingcloud']['credentials'])) {
41
            $message = "The key 'password' has not been specified under the key 'reportingcloud', sub-key 'credentials' in your application's configuration file. {$help}";
42
            throw new InvalidArgumentException($message);
43
        }
44
45
        return [
46
            'username' => $config['reportingcloud']['credentials']['username'],