CheckGlobalSight   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 10
dl 0
loc 21
rs 10
c 0
b 0
f 0
wmc 3

1 Method

Rating   Name   Duplication   Size   Complexity  
A check() 0 15 3
1
<?php
2
3
namespace Matecat\XliffParser\XliffUtils\CheckPipeline;
4
5
class CheckGlobalSight implements CheckInterface {
6
    /**
7
     * @param array|null $tmp
8
     *
9
     * @return array|null
10
     */
11
    public function check( ?array $tmp = [] ): ?array {
12
        $fileType = [];
13
14
        if ( isset( $tmp[ 0 ] ) ) {
15
            if ( stripos( $tmp[ 0 ], 'globalsight' ) !== false ) {
16
                $fileType[ 'proprietary' ]            = true;
17
                $fileType[ 'proprietary_name' ]       = 'GlobalSight Download File';
18
                $fileType[ 'proprietary_short_name' ] = 'globalsight';
19
                $fileType[ 'converter_version' ]      = 'legacy';
20
21
                return $fileType;
22
            }
23
        }
24
25
        return null;
26
27
    }
28
}
29