make phpstan happy
This commit is contained in:
parent
c1b3c99667
commit
d7c070b22b
|
@ -52,6 +52,7 @@
|
||||||
header("Content-Type: text/json");
|
header("Content-Type: text/json");
|
||||||
print Errors::to_json(Errors::E_UNAUTHORIZED);
|
print Errors::to_json(Errors::E_UNAUTHORIZED);
|
||||||
|
|
||||||
|
$scope->getSpan()->setTag('error', Errors::E_UNAUTHORIZED);
|
||||||
$scope->close();
|
$scope->close();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -60,6 +61,8 @@
|
||||||
|
|
||||||
if (Config::is_migration_needed()) {
|
if (Config::is_migration_needed()) {
|
||||||
print Errors::to_json(Errors::E_SCHEMA_MISMATCH);
|
print Errors::to_json(Errors::E_SCHEMA_MISMATCH);
|
||||||
|
|
||||||
|
$scope->getSpan()->setTag('error', Errors::E_SCHEMA_MISMATCH);
|
||||||
$scope->close();
|
$scope->close();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -122,11 +125,14 @@
|
||||||
user_error("Refusing to invoke method $method of handler $op which starts with underscore.", E_USER_WARNING);
|
user_error("Refusing to invoke method $method of handler $op which starts with underscore.", E_USER_WARNING);
|
||||||
header("Content-Type: text/json");
|
header("Content-Type: text/json");
|
||||||
print Errors::to_json(Errors::E_UNAUTHORIZED);
|
print Errors::to_json(Errors::E_UNAUTHORIZED);
|
||||||
|
|
||||||
|
$scope->getSpan()->setTag('error', Errors::E_UNAUTHORIZED);
|
||||||
$scope->close();
|
$scope->close();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($override) {
|
if ($override) {
|
||||||
|
/** @var Plugin|IHandler|ICatchall $handler */
|
||||||
$handler = $override;
|
$handler = $override;
|
||||||
} else {
|
} else {
|
||||||
$reflection = new ReflectionClass($op);
|
$reflection = new ReflectionClass($op);
|
||||||
|
|
|
@ -37,7 +37,7 @@ class Tracer {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $name
|
* @param string $name
|
||||||
* @param array<mixed> $options
|
* @param array<string>|array<string, array<string, mixed>> $options
|
||||||
* @param array<string> $args
|
* @param array<string> $args
|
||||||
* @return Scope
|
* @return Scope
|
||||||
*/
|
*/
|
||||||
|
@ -51,12 +51,12 @@ class Tracer {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $name
|
* @param string $name
|
||||||
* @param array<string> $options
|
* @param array<string>|array<string, array<string, mixed>> $options
|
||||||
* @param array<string> $args
|
* @param array<string> $args
|
||||||
* @return Scope
|
* @return Scope
|
||||||
*/
|
*/
|
||||||
public static function start(string $name, array $options = [], array $args = []) : Scope {
|
public static function start(string $name, array $options = [], array $args = []) : Scope {
|
||||||
return self::get_instance()->_start($name, $options);
|
return self::get_instance()->_start($name, $options, $args);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function get_instance() : Tracer {
|
public static function get_instance() : Tracer {
|
||||||
|
|
Loading…
Reference in New Issue