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

DefaultFilenameFormatter   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
dl 0
loc 15
c 0
b 0
f 0
wmc 1
lcom 0
cbo 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A handle() 0 4 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