From ef2d480ccb0ec447ccb234c0a9a904c4db3aad8a Mon Sep 17 00:00:00 2001 From: Akihito Koriyama Date: Sat, 20 Apr 2024 08:34:14 +0900 Subject: [PATCH] Ignore PHPStan check on XHProf line Added PHPStan ignore comment to the XHProf profile saving line in DevInvoker.php. This change ensures that PHPStan does not inspect this line --- src/DevInvoker.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/DevInvoker.php b/src/DevInvoker.php index 845f62e..70cbdd6 100644 --- a/src/DevInvoker.php +++ b/src/DevInvoker.php @@ -77,7 +77,7 @@ private function devInvoke(ResourceObject $resource, AbstractRequest $request): $resource->headers[self::HEADER_MEMORY_USAGE] = (string) (memory_get_usage() - $memory); if (extension_loaded('xhprof')) { $xhprof = xhprof_disable(); - $profileId = (new XHProfRuns_Default(sys_get_temp_dir()))->save_run($xhprof, 'resource'); + $profileId = (new XHProfRuns_Default(sys_get_temp_dir()))->save_run($xhprof, 'resource'); // @phpstan-ignore-line $resource->headers[self::HEADER_PROFILE_ID] = $profileId; }