RefundPaymentRequest   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
eloc 4
c 1
b 0
f 0
dl 0
loc 12
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A isValid() 0 4 3
1
<?php
2
3
/**
4
 * PHP version 5.4 and 8
5
 *
6
 * @category  RequestEntity
7
 * @package   Payever\Payments
8
 * @author    payever GmbH <[email protected]>
9
 * @copyright 2017-2021 payever GmbH
10
 * @license   MIT <https://opensource.org/licenses/MIT>
11
 * @link      https://docs.payever.org/shopsystems/api/getting-started
12
 */
13
14
namespace Payever\ExternalIntegration\Payments\Http\RequestEntity;
15
16
use Payever\ExternalIntegration\Core\Http\RequestEntity;
17
18
/**
19
 * This class represents Refund Payment RequestInterface Entity
20
 *
21
 * @method float getAmount()
22
 * @method self  setAmount(float $amount)
23
 */
24
class RefundPaymentRequest extends RequestEntity
25
{
26
    /** @var float $amount */
27
    protected $amount;
28
29
    /**
30
     * {@inheritdoc}
31
     */
32
    public function isValid()
33
    {
34
        return parent::isValid() &&
35
            (!$this->amount || is_numeric($this->amount))
36
        ;
37
    }
38
}
39