ToneAnalyzer::getVersion()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace IBM\Watson\Service;
4
5
use IBM\Watson\Common\AbstractService as BaseService;
6
use IBM\Watson\Service\ToneAnalyzer\Message\AnalyzeToneRequest;
7
8
/**
9
 * This class is the main class for interacting with
10
 * the IBM Watson Tone Analyzer service
11
 *
12
 * @package IBM\Watson\ToneAnalyzer
13
 */
14
class ToneAnalyzer extends BaseService
15
{
16
    /**
17
     * The version is the date for the version of the API that you want to call.
18
     *
19
     * @param string $value Set the API version to use
20
     *
21
     * @return $this
22
     */
23
    public function setVersion($value)
24
    {
25
        return $this->setParameter('version', $value);
26
    }
27
28
    /**
29
     * Get the version of the API previously set
30
     *
31
     * @return string
32
     */
33
    public function getVersion()
34
    {
35
        return $this->getParameter('version');
36
    }
37
38
    /**
39
     * Analyze tone
40
     *
41
     * @param array $parameters
42
     *
43
     * @return \IBM\Watson\Common\Message\AbstractRequest
44
     */
45
    public function analyzeTone(array $parameters = [])
46
    {
47
        return $this->createRequest(AnalyzeToneRequest::class, $parameters);
48
    }
49
}
50