DefaultFilenameFormatter   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A handle() 0 3 1
1
<?php
2
3
namespace Cion\TextToSpeech\Formatters;
4
5
use Cion\TextToSpeech\Contracts\Formatter as FormatterContract;
6
7
class DefaultFilenameFormatter implements FormatterContract
8
{
9
    /**
10
     * Handles the filename of the audio.
11
     *
12
     * @param  string $text  The text source.
13
     * @param  mixed $audio The result audio content.
14
     *
15
     * @return string
16
     */
17
    public function handle($text, $audio = null): string
18
    {
19
        return md5($text);
20
    }
21
}
22