| Conditions | 4 |
| Paths | 4 |
| Total Lines | 12 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 5.4042 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 18 | 8 | public function execute(): bool |
|
| 19 | { |
||
| 20 | try { |
||
| 21 | 8 | $this->client->deleteTable($this->toArray()); |
|
| 22 | //$this->client->waitUntil('TableExists', ['TableName' => $this->tableName]); |
||
| 23 | 7 | return true; |
|
| 24 | 1 | } catch (DynamoDbException $ex) { |
|
| 25 | 1 | throw new Exception($ex->getMessage()); |
|
| 26 | } catch (InvalidArgumentException $ex) { |
||
| 27 | throw new Exception('Bad key schema: ' . $ex->getMessage()); |
||
| 28 | } catch (\Exception $ex) { |
||
| 29 | die($ex->getMessage()); |
||
| 30 | } |
||
| 33 |
For hinted functions/methods where all return statements with the correct type are only reachable via conditions, ?null? gets implicitly returned which may be incompatible with the hinted type. Let?s take a look at an example: