1 | <?php |
||
13 | class Logger extends \Aura\Sql\Profiler { |
||
14 | |||
15 | /** |
||
16 | * the YDB instance |
||
17 | * @var YOURLS\Database\YDB |
||
18 | */ |
||
19 | protected $ydb; |
||
20 | |||
21 | /** |
||
22 | * Debug log where messages are stored |
||
23 | * @var array |
||
24 | */ |
||
25 | protected $debug_log = array(); |
||
26 | |||
27 | /** |
||
28 | * Are we emulating prepare statements ? |
||
29 | * @var bool |
||
30 | */ |
||
31 | protected $is_emulate_prepare; |
||
32 | |||
33 | public function __construct(YDB $ydb) { |
||
49 | |||
50 | /** |
||
51 | * @param string $message |
||
52 | */ |
||
53 | public function log($message) { |
||
57 | |||
58 | public function get_log() { |
||
61 | |||
62 | /** |
||
63 | * Extends \Aura\Sql\Profiler::addProfile() to log queries in our YOURLS logger |
||
64 | * |
||
65 | * @since 1.7.3 |
||
66 | * @param float $duration The query duration. |
||
67 | * @param string $function The PDO method that made the entry. |
||
68 | * @param string $statement The SQL query statement. |
||
69 | * @param array $bind_values The values bound to the statement. |
||
70 | * @return void |
||
71 | */ |
||
72 | public function addProfile($duration, $function, $statement, array $bind_values = array() ) { |
||
85 | |||
86 | /** |
||
87 | * Format PDO statement with bind/values replacement |
||
88 | * |
||
89 | * This replaces PDO binds such as 'key_name = :name' with corresponding array values, eg array('name'=>'some value') |
||
90 | * This is merely a cosmetic replacement to allow for readability: the result WILL NOT be valid SQL! (eg no proper quotes) |
||
91 | * |
||
92 | * @since 1.7.3 |
||
93 | * @param string $statement SQL query with PDO style named placeholders |
||
94 | * @param array $values Optional array of values corresponding to placeholders |
||
95 | * @return string Readable SQL query with placeholders replaced |
||
96 | */ |
||
97 | public function pretty_format($statement, array $values = array() ) { |
||
118 | |||
119 | } |
||
120 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..