Passed
Push — develop ( a82d29...5207c2 )
by Jens
08:45
created

LineItemsTarget::ofPredicate()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 4
ccs 0
cts 2
cp 0
rs 10
c 1
b 0
f 0
cc 1
eloc 2
nc 1
nop 2
crap 2
1
<?php
2
/**
3
 * @author @jayS-de <[email protected]>
4
 */
5
6
namespace Commercetools\Core\Model\CartDiscount;
7
8
/**
9
 * @package Commercetools\Core\Model\CartDiscount
10
 *
11
 * @method string getType()
12
 * @method LineItemsTarget setType(string $type = null)
13
 * @method string getPredicate()
14
 * @method LineItemsTarget setPredicate(string $predicate = null)
15
 */
16
class LineItemsTarget extends CartDiscountTarget
17
{
18
    const TARGET_TYPE = 'lineItems';
19
20
    public static function ofPredicate($predicate, $context = null)
21
    {
22
        return static::of($context)->setPredicate($predicate);
23
    }
24
}
25