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.

Converter   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 7
c 1
b 0
f 0
dl 0
loc 19
rs 10
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A convert() 0 9 2
1
<?php
2
3
namespace Soheilrt\AdobeConnectClient\Client\Converter;
4
5
use DomainException;
6
use InvalidArgumentException;
7
use Soheilrt\AdobeConnectClient\Client\Connection\ResponseInterface;
8
9
abstract class Converter
10
{
11
    /**
12
     * @param ResponseInterface $response
13
     *
14
     * @throws InvalidArgumentException if data is invalid
15
     * @throws DomainException          if data type is not implemented
16
     *
17
     * @return array An associative array
18
     */
19
    public static function convert(ResponseInterface $response): array
20
    {
21
        $type = $response->getHeaderLine('Content-Type');
22
23
        switch (mb_strtolower($type)) {
24
            case 'text/xml':
25
                return ConverterXML::convert($response);
26
            default:
27
                throw new DomainException('Type "' . $type . '" not implemented.');
28
        }
29
    }
30
}
31