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

Action::isApplicable()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 1
crap 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