Skip to content

Commit

Permalink
Ignore PHPStan check on XHProf line
Browse files Browse the repository at this point in the history
Added PHPStan ignore comment to the XHProf profile saving line in DevInvoker.php. This change ensures that PHPStan does not inspect this line
  • Loading branch information
koriym committed Apr 19, 2024
1 parent 05629bf commit ef2d480
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/DevInvoker.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit ef2d480

Please sign in to comment.