DeleteTableOperation   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 2
eloc 6
c 2
b 0
f 0
dl 0
loc 9
ccs 5
cts 5
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A execute() 0 7 2
1
<?php
2
3
namespace Guillermoandrae\DynamoDb\Operation;
4
5
use Aws\DynamoDb\Exception\DynamoDbException;
6
use Guillermoandrae\DynamoDb\Contract\AbstractTableOperation;
7
use Guillermoandrae\DynamoDb\Factory\ExceptionFactory;
8
9
/**
10
 * DeleteTable operation.
11
 *
12
 * @author Guillermo A. Fisher <[email protected]>
13
 * @link https://docs.aws.amazon.com/aws-sdk-php/v3/api/api-dynamodb-2012-08-10.html#deletetable
14
 */
15
final class DeleteTableOperation extends AbstractTableOperation
16
{
17 13
    public function execute(): bool
18
    {
19
        try {
20 13
            $this->client->deleteTable($this->toArray());
21 12
            return true;
22 1
        } catch (DynamoDbException $ex) {
23 1
            throw ExceptionFactory::factory($ex);
24
        }
25
    }
26
}
27