Completed
Push — master ( 68ef33...ad6a51 )
by Levan
02:35
created

SampleTokenGenerator   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
lcom 0
cbo 0
dl 0
loc 9
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
		return sprintf('%d.%d', rand(10000, 99999), rand(10000, 99999));
15
	}
16
}
17