Skip to content

Commit 3bb6e2e

Browse files
committed
fix: Remove unnecessary whitespace in recordQueryFailure method and improve logging condition
1 parent f8eb4af commit 3bb6e2e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Monitoring/MetricsCollector.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,14 +76,14 @@ public static function recordQueryTime(string $query, float $timeMs): void
7676
public static function recordQueryFailure(string $query): void
7777
{
7878
self::$metrics['queries_failed']++;
79-
79+
8080
// Only log to error_log if not in testing environment
8181
$isTestingEnv = (
8282
(isset($_ENV['APP_ENV']) && $_ENV['APP_ENV'] === 'testing') ||
8383
(isset($_SERVER['APP_ENV']) && $_SERVER['APP_ENV'] === 'testing') ||
8484
defined('PHPUNIT_RUNNING')
8585
);
86-
86+
8787
if (!$isTestingEnv) {
8888
error_log('Cycle ORM Query Failed: Query: ' . substr($query, 0, 100));
8989
}

0 commit comments

Comments
 (0)