Skip to content

Commit 79cc3ff

Browse files
committed
Fix CS
1 parent 28fd5a5 commit 79cc3ff

File tree

2 files changed

+6
-13
lines changed

2 files changed

+6
-13
lines changed

DependencyInjection/MonologExtension.php

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
namespace Symfony\Bundle\MonologBundle\DependencyInjection;
1313

14-
use InvalidArgumentException;
1514
use Monolog\Logger;
1615
use Monolog\Processor\ProcessorInterface;
1716
use Monolog\ResettableInterface;
@@ -859,7 +858,7 @@ private function buildHandler(ContainerBuilder $container, $name, array $handler
859858
$nullWarning = ', if you meant to define a null handler in a yaml config, make sure you quote "null" so it does not get converted to a php null';
860859
}
861860

862-
throw new InvalidArgumentException(sprintf('Invalid handler type "%s" given for handler "%s"' . $nullWarning, $handler['type'], $name));
861+
throw new \InvalidArgumentException(sprintf('Invalid handler type "%s" given for handler "%s"' . $nullWarning, $handler['type'], $name));
863862
}
864863

865864
if (!empty($handler['nested']) && true === $handler['nested']) {
@@ -967,20 +966,14 @@ private function getHandlerClassByType($handlerType)
967966

968967
if (!isset($typeToClassMapping[$handlerType])) {
969968
if (Logger::API === 1 && array_key_exists($handlerType, $v2HandlerTypesAdded)) {
970-
throw new InvalidArgumentException(
971-
sprintf('"%s" was added in MonoLog v2, please upgrade if you wish to use.', $handlerType)
972-
);
969+
throw new \InvalidArgumentException(sprintf('"%s" was added in Monolog v2, please upgrade if you wish to use it.', $handlerType));
973970
}
974971

975972
if (Logger::API === 2 && array_key_exists($handlerType, $v2HandlerTypesRemoved)) {
976-
throw new InvalidArgumentException(
977-
sprintf('"%s" was removed in MonoLog v2.', $handlerType)
978-
);
973+
throw new \InvalidArgumentException(sprintf('"%s" was removed in Monolog v2.', $handlerType));
979974
}
980975

981-
throw new InvalidArgumentException(
982-
sprintf('There is no handler class defined for handler "%s".', $handlerType)
983-
);
976+
throw new \InvalidArgumentException(sprintf('There is no handler class defined for handler "%s".', $handlerType));
984977
}
985978

986979
return $typeToClassMapping[$handlerType];

Tests/DependencyInjection/MonologExtensionTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,7 @@ public function testV2Removed($handlerType)
547547
}
548548

549549
$this->expectException(InvalidArgumentException::class);
550-
$this->expectExceptionMessage(sprintf('"%s" was removed in MonoLog v2.', $handlerType));
550+
$this->expectExceptionMessage(sprintf('"%s" was removed in Monolog v2.', $handlerType));
551551

552552
$container = new ContainerBuilder();
553553
$loader = new MonologExtension();
@@ -578,7 +578,7 @@ public function testV2AddedOnV1($handlerType)
578578

579579
$this->expectException(InvalidArgumentException::class);
580580
$this->expectExceptionMessage(
581-
sprintf('"%s" was added in MonoLog v2, please upgrade if you wish to use.', $handlerType)
581+
sprintf('"%s" was added in Monolog v2, please upgrade if you wish to use it.', $handlerType)
582582
);
583583

584584
$container = new ContainerBuilder();

0 commit comments

Comments
 (0)