| Total Complexity | 8 |
| Total Lines | 59 |
| Duplicated Lines | 0 % |
| Coverage | 88.89% |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 9 | trait HandlesGraphs |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * @param array<mixed> $properties |
||
| 13 | * @throws ArangoException |
||
| 14 | * |
||
| 15 | * @SuppressWarnings(PHPMD.BooleanArgumentFlag) |
||
| 16 | */ |
||
| 17 | 8 | public function createGraph(string $name, array $properties = [], bool $waitForSync = false) |
|
| 18 | { |
||
| 19 | 8 | $this->schemaManager->createGraph($name, $properties, $waitForSync); |
|
| 20 | } |
||
| 21 | |||
| 22 | 2 | public function hasGraph(string $name): bool |
|
| 23 | { |
||
| 24 | 2 | return $this->handleExceptionsAsQueryExceptions(function () use ($name) { |
|
|
|
|||
| 25 | 2 | return $this->schemaManager->hasGraph($name); |
|
| 26 | 2 | }); |
|
| 27 | } |
||
| 28 | |||
| 29 | /** |
||
| 30 | * @throws ArangoException |
||
| 31 | */ |
||
| 32 | public function getGraph(string $name): \stdClass |
||
| 35 | } |
||
| 36 | |||
| 37 | /** |
||
| 38 | * @throws ArangoException |
||
| 39 | */ |
||
| 40 | 2 | public function getAllGraphs(): array |
|
| 43 | } |
||
| 44 | |||
| 45 | /** |
||
| 46 | * @throws ArangoException |
||
| 47 | */ |
||
| 48 | 1 | public function dropGraph(string $name) |
|
| 49 | { |
||
| 50 | 1 | $this->schemaManager->deleteGraph($name); |
|
| 51 | } |
||
| 52 | |||
| 53 | /** |
||
| 54 | * @throws ArangoException |
||
| 55 | */ |
||
| 56 | 2 | public function dropGraphIfExists(string $name): bool |
|
| 63 | } |
||
| 64 | |||
| 65 | 35 | public function dropAllGraphs(): void |
|
| 66 | { |
||
| 70 |