UpdateExpression   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 4
eloc 7
c 2
b 0
f 0
dl 0
loc 24
ccs 10
cts 10
cp 1
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A remove() 0 7 2
A reset() 0 3 1
1
<?php
2
3
namespace BaoPham\DynamoDb\Parsers;
4
5
class UpdateExpression
6
{
7
    /**
8
     * @var ExpressionAttributeNames
9
     */
10
    protected $names;
11
12 132
    public function __construct(ExpressionAttributeNames $names)
13
    {
14 132
        $this->names = $names;
15 132
    }
16
17 124
    public function reset()
18
    {
19 124
        $this->names->reset();
20 124
    }
21
22 7
    public function remove(array $attributes)
23
    {
24 7
        foreach ($attributes as $attribute) {
25 7
            $this->names->set($attribute);
26
        }
27
28 7
        return 'REMOVE ' . implode(', ', $this->names->placeholders());
29
    }
30
}
31