Completed
Push — master ( cb1c4d...bab678 )
by Andrii
04:49
created

Action   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
lcom 0
cbo 2
dl 0
loc 10
ccs 2
cts 2
cp 1
rs 10
c 1
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A isApplicable() 0 4 1
1
<?php
2
/**
3
 * PHP Billing Library
4
 *
5
 * @link      https://github.com/hiqdev/php-billing
6
 * @package   php-billing
7
 * @license   BSD-3-Clause
8
 * @copyright Copyright (c) 2017-2018, HiQDev (http://hiqdev.com/)
9
 */
10
11
namespace hiqdev\php\billing\action;
12
13
use hiqdev\php\billing\price\PriceInterface;
14
15
/**
16
 * Simple Action.
17
 * It is applicable when price is applicable.
18
 * But it can be different see Coupon.
19
 *
20
 * @author Andrii Vasyliev <[email protected]>
21
 */
22
class Action extends AbstractAction
23
{
24
    /**
25
     * {@inheritdoc}
26
     */
27 6
    public function isApplicable(PriceInterface $price): bool
28
    {
29 6
        return $price->isApplicable($this);
30
    }
31
}
32