TranslateApiFactory   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 27
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A getApi() 0 3 1
1
<?php
2
3
namespace GinoPane\PHPolyglot\API\Factory\Translate;
4
5
use GinoPane\PHPolyglot\API\Factory\ApiFactoryAbstract;
6
use GinoPane\PHPolyglot\API\Implementation\Translate\TranslateApiInterface;
7
8
/**
9
 * Class TranslateApiFactory
10
 *
11
 * @author Sergey <Gino Pane> Karavay
12
 */
13
class TranslateApiFactory extends ApiFactoryAbstract
14
{
15
    /**
16
     * Config section name that is being checked for existence. API-specific properties must
17
     * be located under that section
18
     *
19
     * @var string
20
     */
21
    protected $configSectionName = 'translateApi';
22
23
    /**
24
     * API interface that must be implemented by API class
25
     *
26
     * @var string
27
     */
28
    protected $apiInterface = TranslateApiInterface::class;
29
30
    /**
31
     * Gets necessary Translate API object
32
     *
33
     * @param array $parameters
34
     *
35
     * @return TranslateApiInterface
36
     */
37
    public function getApi(array $parameters = []): TranslateApiInterface
38
    {
39
        return parent::getApi($parameters);
40
    }
41
}
42