diff vendor/symfony/console/Logger/ConsoleLogger.php @ 17:129ea1e6d783

Update, including to Drupal core 8.6.10
author Chris Cannam
date Thu, 28 Feb 2019 13:21:36 +0000
parents 1fec387a4317
children
line wrap: on
line diff
--- a/vendor/symfony/console/Logger/ConsoleLogger.php	Tue Jul 10 15:07:59 2018 +0100
+++ b/vendor/symfony/console/Logger/ConsoleLogger.php	Thu Feb 28 13:21:36 2019 +0000
@@ -14,8 +14,8 @@
 use Psr\Log\AbstractLogger;
 use Psr\Log\InvalidArgumentException;
 use Psr\Log\LogLevel;
+use Symfony\Component\Console\Output\ConsoleOutputInterface;
 use Symfony\Component\Console\Output\OutputInterface;
-use Symfony\Component\Console\Output\ConsoleOutputInterface;
 
 /**
  * PSR-3 compliant console logger.
@@ -30,7 +30,7 @@
     const ERROR = 'error';
 
     private $output;
-    private $verbosityLevelMap = array(
+    private $verbosityLevelMap = [
         LogLevel::EMERGENCY => OutputInterface::VERBOSITY_NORMAL,
         LogLevel::ALERT => OutputInterface::VERBOSITY_NORMAL,
         LogLevel::CRITICAL => OutputInterface::VERBOSITY_NORMAL,
@@ -39,8 +39,8 @@
         LogLevel::NOTICE => OutputInterface::VERBOSITY_VERBOSE,
         LogLevel::INFO => OutputInterface::VERBOSITY_VERY_VERBOSE,
         LogLevel::DEBUG => OutputInterface::VERBOSITY_DEBUG,
-    );
-    private $formatLevelMap = array(
+    ];
+    private $formatLevelMap = [
         LogLevel::EMERGENCY => self::ERROR,
         LogLevel::ALERT => self::ERROR,
         LogLevel::CRITICAL => self::ERROR,
@@ -49,10 +49,10 @@
         LogLevel::NOTICE => self::INFO,
         LogLevel::INFO => self::INFO,
         LogLevel::DEBUG => self::INFO,
-    );
+    ];
     private $errored = false;
 
-    public function __construct(OutputInterface $output, array $verbosityLevelMap = array(), array $formatLevelMap = array())
+    public function __construct(OutputInterface $output, array $verbosityLevelMap = [], array $formatLevelMap = [])
     {
         $this->output = $output;
         $this->verbosityLevelMap = $verbosityLevelMap + $this->verbosityLevelMap;
@@ -62,7 +62,7 @@
     /**
      * {@inheritdoc}
      */
-    public function log($level, $message, array $context = array())
+    public function log($level, $message, array $context = [])
     {
         if (!isset($this->verbosityLevelMap[$level])) {
             throw new InvalidArgumentException(sprintf('The log level "%s" does not exist.', $level));
@@ -111,7 +111,7 @@
             return $message;
         }
 
-        $replacements = array();
+        $replacements = [];
         foreach ($context as $key => $val) {
             if (null === $val || is_scalar($val) || (\is_object($val) && method_exists($val, '__toString'))) {
                 $replacements["{{$key}}"] = $val;