Passed
Push — master ( 8db20a...7c0ad0 )
by Andrey
03:28
created

CommonGeneral   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 10
dl 0
loc 22
rs 10
c 1
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getMessageCodeText() 0 5 1
A prolongateKey() 0 8 1
1
<?php
2
3
namespace Daaner\NovaPoshta\Models;
4
5
use Daaner\NovaPoshta\NovaPoshta;
6
7
class CommonGeneral extends NovaPoshta
8
{
9
    protected $model = 'CommonGeneral';
10
    protected $calledMethod;
11
    protected $methodProperties = null;
12
13
    public function getMessageCodeText()
14
    {
15
        $this->calledMethod = 'getMessageCodeText';
16
17
        return $this->getResponse($this->model, $this->calledMethod, $this->methodProperties);
18
    }
19
20
    // не работает, требует JWT авторизацию
21
    public function prolongateKey($ApiKey, $month = 12)
22
    {
23
        $this->calledMethod = 'prolongateApiKey';
24
25
        $this->methodProperties['ApiKey'] = $ApiKey;
26
        $this->methodProperties['prolongateMounthCount'] = $month;
27
28
        return $this->getResponse($this->model, $this->calledMethod, $this->methodProperties);
29
    }
30
}
31