Conditions | 1 |
Paths | 1 |
Total Lines | 17 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
39 | protected function insert(string $test, string $time): void |
||
40 | { |
||
41 | [$class, $method] = explode('::', $test); |
||
42 | |||
43 | $this->connection |
||
44 | ->prepare( |
||
45 | "INSERT INTO `{$this->credentials['table']}` (time, method, class, name) |
||
46 | VALUES(:time, :method, :class, :name) |
||
47 | ON CONFLICT(name) DO UPDATE SET time = :time;" |
||
48 | ) |
||
49 | ->execute([ |
||
50 | 'time' => $time, |
||
51 | 'method' => $method, |
||
52 | 'class' => $class, |
||
53 | 'name' => $test, |
||
54 | ]); |
||
55 | } |
||
56 | } |
||
57 |
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.