| Total Complexity | 4 |
| Total Lines | 28 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 18 | class Command implements CommandConsumer |
||
| 19 | { |
||
| 20 | private const NAME = 'neo4j_integration.run_command'; |
||
| 21 | |||
| 22 | /** @var string */ |
||
| 23 | private $query; |
||
| 24 | |||
| 25 | public function __construct(string $query) |
||
| 26 | { |
||
| 27 | Assertion::notEmpty($query); |
||
| 28 | $this->query = $query; |
||
| 29 | } |
||
| 30 | |||
| 31 | public function getName(): Name |
||
| 32 | { |
||
| 33 | return new Name(self::NAME); |
||
| 34 | } |
||
| 35 | |||
| 36 | public function getPayload(): array |
||
| 37 | { |
||
| 38 | return [ |
||
| 39 | 'query' => $this->query |
||
| 40 | ]; |
||
| 41 | } |
||
| 42 | |||
| 43 | public function getCypherQuery(): string |
||
| 46 | } |
||
| 47 | } |
||
| 48 |