| Server IP : 145.239.37.162 / Your IP : 216.73.217.46 Web Server : Apache System : Linux webm003.cluster130.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64 User : verseaa ( 38250) PHP Version : 7.4.33 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/verseaa/www/wp-content/plugins/query-monitor/classes/ |
Upload File : |
<?php declare(strict_types = 1);
/**
* Class representing something that's kind of wrong.
*
* @package query-monitor
*/
/**
* @template TArgs of array
*/
abstract class QM_Wrong implements JsonSerializable {
private QM_Backtrace $backtrace;
/**
* @phpstan-var TArgs $args
*/
protected array $args;
/**
* @phpstan-param TArgs $args
*/
public function __construct( QM_Backtrace $backtrace, array $args = [] ) {
$this->backtrace = $backtrace;
$this->args = $args;
}
abstract public function get_message(): string;
final public function get_trace(): QM_Backtrace {
return $this->backtrace;
}
/**
* @return array{trace: QM_Backtrace, message: string}
*/
public function jsonSerialize(): array {
return [
'trace' => $this->backtrace,
'message' => $this->get_message(),
];
}
}