Completed
Push — master ( 8e9456...c023b7 )
by Rigel Kent
01:22
created

DefaultFilenameFormatter::handle()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
c 0
b 0
f 0
rs 10
cc 1
nc 1
nop 2
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