SampleTokenGenerator   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 8
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 2
dl 0
loc 8
c 0
b 0
f 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A generateToken() 0 3 1
1
<?php
2
3
namespace Stichoza\GoogleTranslate\Tokens;
4
5
/**
6
 * A nice interface for providing tokens.
7
 */
8
class SampleTokenGenerator implements TokenProviderInterface
9
{
10
    /**
11
     * Generate a fake token just as an example.
12
     */
13
    public function generateToken($source, $target, $text)
14
    {
15
        return sprintf('%d.%d', rand(10000, 99999), rand(10000, 99999));
16
    }
17
}
18