Get::getCurrencies()   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
/*
4
 * This file is part of GetCake PHP Client.
5
 *
6
 * (c) DraperStudio <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Apivore\GetCake\Api;
13
14
use Apivore\Core\AbstractApi;
15
16
/**
17
 * Class Get.
18
 *
19
 * @author DraperStudio <[email protected]>
20
 */
21
class Get extends AbstractApi
22
{
23
    /**
24
     * @return mixed
25
     */
26
    public function getCurrencies()
27
    {
28
        return $this->get('2/get.asmx/GetCurrencies');
0 ignored issues
show
Documentation Bug introduced by
The method get does not exist on object<Apivore\GetCake\Api\Get>? Since you implemented __call, maybe consider adding a @method annotation.

If you implement __call and you know which methods are available, you can improve IDE auto-completion and static analysis by adding a @method annotation to the class.

This is often the case, when __call is implemented by a parent class and only the child class knows which methods exist:

class ParentClass {
    private $data = array();

    public function __call($method, array $args) {
        if (0 === strpos($method, 'get')) {
            return $this->data[strtolower(substr($method, 3))];
        }

        throw new \LogicException(sprintf('Unsupported method: %s', $method));
    }
}

/**
 * If this class knows which fields exist, you can specify the methods here:
 *
 * @method string getName()
 */
class SomeClass extends ParentClass { }
Loading history...
29
    }
30
31
    /**
32
     * @return mixed
33
     */
34
    public function getDispositionTypes()
35
    {
36
        return $this->get('3/get.asmx/GetDispositionTypes');
0 ignored issues
show
Documentation Bug introduced by
The method get does not exist on object<Apivore\GetCake\Api\Get>? Since you implemented __call, maybe consider adding a @method annotation.

If you implement __call and you know which methods are available, you can improve IDE auto-completion and static analysis by adding a @method annotation to the class.

This is often the case, when __call is implemented by a parent class and only the child class knows which methods exist:

class ParentClass {
    private $data = array();

    public function __call($method, array $args) {
        if (0 === strpos($method, 'get')) {
            return $this->data[strtolower(substr($method, 3))];
        }

        throw new \LogicException(sprintf('Unsupported method: %s', $method));
    }
}

/**
 * If this class knows which fields exist, you can specify the methods here:
 *
 * @method string getName()
 */
class SomeClass extends ParentClass { }
Loading history...
37
    }
38
}
39