SampleTokenGenerator::generateToken()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

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