GoogleTranslate::setSource()   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
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Translation\Clients;
4
5
use Translation\Contracts\Client;
6
use Translation\Services\GoogleTranslate as TranslateClient;
7
8
class GoogleTranslate implements Client
9
{
10
    /**
11
     * @var TranslateClient 
12
     */
13
    protected $client;
14
15
    /**
16
     * @param TranslateClient $client
17
     */
18
    public function __construct(TranslateClient $client)
19
    {
20
        $this->client = $client;
21
    }
22
23
    /**
24
     * {@inheritdoc}
25
     */
26
    public function setSource($source = null)
27
    {
28
        return $this->client->setSource($source);
29
    }
30
31
    /**
32
     * {@inheritdoc}
33
     */
34
    public function setTarget($target)
35
    {
36
        return $this->client->setTarget($target);
37
    }
38
39
    /**
40
     * {@inheritdoc}
41
     */
42
    public function translate($text)
43
    {
44
        return $this->client->translate($text);
45
    }
46
}
47