Completed
Push — master ( 367642...b5a2de )
by Minas
01:34
created

Balance::create()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7

Duplication

Lines 7
Ratio 100 %

Importance

Changes 0
Metric Value
dl 7
loc 7
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
/**
3
 * EveryPay PHP Library
4
 */
5
6
namespace Everypay;
7
8
/**
9
 * Balance resource class.
10
 */
11 View Code Duplication
class Balance extends AbstractResource
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
12
{
13
    /**
14
     * API resource name.
15
     *
16
     * @var string
17
     */
18
    const RESOURCE_NAME = 'balance';
19
20
    /**
21
     * Retrieve a merchant's balance.
22
     * 
23
     * @return stdClass
24
     */
25
    public static function balance()
26
    {
27
        return self::invoke(__FUNCTION__, static::RESOURCE_NAME, array());
28
    }
29
30
    /**
31
     * Not avalable for this resource.
32
     *
33
     * @throws Everypay\Exception\RuntimeException
34
     */
35
    public static function create(array $params)
36
    {
37
        throw new Exception\RuntimeException(
38
            'Resource ' . ucfirst(static::RESOURCE_NAME) .
39
            ' does not support method ' . __METHOD__
40
        );
41
    }
42
43
    /**
44
     * Not avalable for this resource.
45
     *
46
     * @throws Everypay\Exception\RuntimeException
47
     */
48
    public static function update($token, array $params)
49
    {
50
        throw new Exception\RuntimeException(
51
            'Resource ' . ucfirst(static::RESOURCE_NAME) .
52
            ' does not support method ' . __METHOD__
53
        );
54
    }
55
56
    /**
57
     * Not avalable for this resource.
58
     *
59
     * @throws Everypay\Exception\RuntimeException
60
     */
61
    public static function delete($token, array $params = array())
62
    {
63
        throw new Exception\RuntimeException(
64
            'Resource ' . ucfirst(static::RESOURCE_NAME) .
65
            ' does not support method ' . __METHOD__
66
        );
67
    }
68
}
69