Conditions | 1 |
Paths | 1 |
Total Lines | 18 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Tests | 12 |
CRAP Score | 1 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
26 | 2 | public function executeInner(SymfonyStyle $io, InputInterface $input): int |
|
27 | { |
||
28 | 2 | $entry = new ObjectEntry( |
|
29 | 2 | $input->getArgument('key'), |
|
30 | 2 | json_decode($input->getArgument('value')) |
|
31 | ); |
||
32 | 2 | $time = new DateTime(); |
|
33 | |||
34 | 2 | $this->objectStore->store($entry, $time); |
|
35 | |||
36 | 2 | $io->horizontalTable(['Key', 'Value', 'Timestamp'], [[ |
|
37 | 2 | $entry->getKey(), |
|
38 | 2 | json_encode($entry->getValue()), |
|
39 | 2 | $time->getTimestamp(), |
|
40 | ]]); |
||
41 | 2 | $io->success('Value stored successfully'); |
|
42 | |||
43 | 2 | return 0; |
|
44 | } |
||
46 |