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.

CompatibilityHelper   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 0
dl 0
loc 31
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A convertType() 0 4 2
1
<?php
2
namespace Onurb\Bundle\ExcelBundle\Factory;
3
4
class CompatibilityHelper
5
{
6
    /**
7
     * @var array
8
     */
9
    private $types = array(
10
        'CSV'           => 'Csv',
11
        'Excel2003XML'  => 'Xml',
12
        'Excel2007'     => 'Xlsx',
13
        'Excel5'        => 'Xls',
14
        'HTML'          => 'Html',
15
        'OOCalc'        => 'Ods',
16
        'OpenDocument'  => 'Ods',
17
        'PDF'           => 'Pdf',
18
        'SYLK'          => 'Slk',
19
20
    );
21
22
    /**
23
     * Documentation link:
24
     * https://phpspreadsheet.readthedocs.io/en/develop/topics/migration-from-PHPExcel/#renamed-readers-and-writers
25
     *
26
     * @param string $type
27
     *
28
     * @return string
29
     */
30 13
    public function convertType($type)
31
    {
32 13
        return isset($this->types[$type]) ? $this->types[$type] : $type;
33
    }
34
}
35