UpdateExpression   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 4
eloc 7
dl 0
loc 24
c 0
b 0
f 0
rs 10

3 Methods

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