Skip to content

Commit

Permalink
Made checkQueue public for testing compatibility
Browse files Browse the repository at this point in the history
Signed-off-by: Tom Wright <tom@inflatablecookie.com>
  • Loading branch information
betterthanclay committed Mar 4, 2024
1 parent 34e2a66 commit 2c4231d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/Wellspring.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,11 @@ public static function register(
$loader->getPriority() === Priority::High
) {
if (self::$initialized) {
spl_autoload_unregister([self::class, 'checkQueue']);
spl_autoload_unregister([self::class, '_checkQueue']);
}

self::$initialized = true;
spl_autoload_register([self::class, 'checkQueue'], true, true);
spl_autoload_register([self::class, '_checkQueue'], true, true);
}
}

Expand Down Expand Up @@ -120,7 +120,7 @@ public static function identifyCallback(
/**
* Queue checker loader
*/
private static function checkQueue(
public static function _checkQueue(
string $class
): void {
self::$initCall++;
Expand All @@ -137,7 +137,7 @@ private static function checkQueue(

foreach ($functions as $i => $function) {
// Check queue
if ($function === [self::class, 'checkQueue']) {
if ($function === [self::class, '_checkQueue']) {
if ($i !== 0) {
$resetCheckQueue = true;
}
Expand Down Expand Up @@ -195,8 +195,8 @@ private static function checkQueue(

// Check queue
if ($resetCheckQueue) {
spl_autoload_unregister([self::class, 'checkQueue']);
spl_autoload_register([self::class, 'checkQueue'], true, true);
spl_autoload_unregister([self::class, '_checkQueue']);
spl_autoload_register([self::class, '_checkQueue'], true, true);
}

self::$functions = spl_autoload_functions();
Expand Down

0 comments on commit 2c4231d

Please sign in to comment.