DecoderUtils   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 6
dl 0
loc 11
ccs 5
cts 5
cp 1
rs 10
c 1
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A extractFormatFromContentType() 0 9 2
1
<?php
2
namespace ElevenLabs\Api\Decoder;
3
4
class DecoderUtils
5
{
6
    public static function extractFormatFromContentType($contentType)
7 5
    {
8
        $parts = explode('/', $contentType);
9 5
        $format = array_pop($parts);
10 5
        if (false !== $pos = strpos($format, '+')) {
11 5
            $format = substr($format, $pos+1);
12 1
        }
13
14
        return $format;
15 5
    }
16
}
17