| Total Complexity | 4 |
| Total Lines | 47 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 9 | class History |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * @var TranslatorInterface |
||
| 13 | */ |
||
| 14 | protected $trans; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * Executed queries |
||
| 18 | * |
||
| 19 | * @var array |
||
| 20 | */ |
||
| 21 | protected $queries = []; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * The constructor |
||
| 25 | * |
||
| 26 | * @param TranslatorInterface $trans |
||
| 27 | */ |
||
| 28 | public function __construct(TranslatorInterface $trans) |
||
| 29 | { |
||
| 30 | $this->trans = $trans; |
||
| 31 | } |
||
| 32 | |||
| 33 | /** |
||
| 34 | * Save a query in the history |
||
| 35 | * |
||
| 36 | * @param string $query |
||
| 37 | * |
||
| 38 | * @return void |
||
| 39 | */ |
||
| 40 | public function save(string $query) |
||
| 45 | ]; |
||
| 46 | } |
||
| 47 | |||
| 48 | /** |
||
| 49 | * Get the remembered queries |
||
| 50 | * |
||
| 51 | * @return array |
||
| 52 | */ |
||
| 53 | public function queries() |
||
| 56 | } |
||
| 57 | } |