bkdotcom/PHPDebugConsole

View on GitHub
src/Debug/Collector/MySqli/ExecuteQueryTrait.php

Summary

Maintainability
A
0 mins
Test Coverage
<?php // phpcs:ignore PSR1.Files.SideEffects.FoundWithSymbol

/**
 * PHP 8.2's new execute_query method requires signatures to match..
 * to maintain compatibility with php < 8.2 we'll use a trait
 */

namespace bdk\Debug\Collector\MySqli;

if (PHP_VERSION_ID >= 80200) {
    require __DIR__ . '/ExecuteQueryTrait_php8.2.php';
} else {
    /**
     * @phpcs:disable Generic.Classes.DuplicateClassName.Found
     */
    trait ExecuteQueryTrait
    {
        // execute_query did not exist in PHP < 8.2
    }
}