Conditions | 1 |
Paths | 1 |
Total Lines | 17 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
35 | protected function insert(string $test, string $time): void |
||
36 | { |
||
37 | [$class, $method] = explode('::', $test); |
||
38 | |||
39 | $this->connection |
||
40 | ->prepare( |
||
41 | "INSERT INTO `{$this->credentials['table']}` (time, method, class, name) |
||
42 | VALUES(:time, :method, :class, :name) |
||
43 | ON CONFLICT(name) DO UPDATE SET time = :time;" |
||
44 | ) |
||
45 | ->execute([ |
||
46 | 'time' => $time, |
||
47 | 'method' => $method, |
||
48 | 'class' => $class, |
||
49 | 'name' => $test, |
||
50 | ]); |
||
51 | } |
||
52 | } |
||
53 |
This check marks access to variables or properties that have not been declared yet. While PHP has no explicit notion of declaring a variable, accessing it before a value is assigned to it is most likely a bug.