DefaultFilenameFormatter::handle()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

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