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

Reversal   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 35
Duplicated Lines 100 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 2
dl 35
loc 35
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A update() 7 7 1
A delete() 7 7 1

How to fix   Duplicated Code   

Duplicated Code

Duplicate code is one of the most pungent code smells. A rule that is often used is to re-structure code once it is duplicated in three or more places.

Common duplication problems, and corresponding solutions are:

1
<?php
2
/**
3
 * EveryPay PHP Library
4
 */
5
6
namespace Everypay;
7
8
/**
9
 * Reversal resource class.
10
 */
11 View Code Duplication
class Reversal 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 = 'reversals';
19
20
    /**
21
     * Not avalable for this resource.
22
     *
23
     * @throws Everypay\Exception\RuntimeException
24
     */
25
    public static function update($token, array $params)
26
    {
27
        throw new Exception\RuntimeException(
28
            'Resource ' . ucfirst(static::RESOURCE_NAME) .
29
            ' does not support method ' . __METHOD__
30
        );
31
    }
32
33
    /**
34
     * Not avalable for this resource.
35
     *
36
     * @throws Everypay\Exception\RuntimeException
37
     */
38
    public static function delete($token, array $params = array())
39
    {
40
        throw new Exception\RuntimeException(
41
            'Resource ' . ucfirst(static::RESOURCE_NAME) .
42
            ' does not support method ' . __METHOD__
43
        );
44
    }
45
}
46