We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 49bad8e commit e24c5baCopy full SHA for e24c5ba
src/Symfony/Component/HttpKernel/Attribute/LogLevel.php
@@ -17,9 +17,12 @@
17
#[\Attribute(\Attribute::TARGET_CLASS)]
18
final class LogLevel
19
{
20
+ /**
21
+ * @param \Psr\Log\LogLevel::* $level
22
+ */
23
public function __construct(public readonly string $level)
24
- if (!\defined(sprintf("\Psr\Log\LogLevel::%s", strtoupper($this->level)))) {
25
+ if (!\defined('Psr\Log\LogLevel::'.strtoupper($this->level))) {
26
throw new \InvalidArgumentException(sprintf('Invalid log level - "%s".', $this->level));
27
}
28
0 commit comments