Code Duplication    Length = 3-4 lines in 4 locations

web/ckfinder/core/connector/php/vendor/monolog/monolog/src/Monolog/Formatter/GelfMessageFormatter.php 1 location

@@ 104-107 (lines=4) @@
101
            $message->setLine($record['extra']['line']);
102
            unset($record['extra']['line']);
103
        }
104
        if (isset($record['extra']['file'])) {
105
            $message->setFile($record['extra']['file']);
106
            unset($record['extra']['file']);
107
        }
108
109
        foreach ($record['extra'] as $key => $val) {
110
            $val = is_scalar($val) || null === $val ? $val : $this->toJson($val);

web/ckfinder/core/connector/php/vendor/monolog/monolog/src/Monolog/Formatter/LogstashFormatter.php 1 location

@@ 113-115 (lines=3) @@
110
        if (isset($record['extra']['server'])) {
111
            $message['@source_host'] = $record['extra']['server'];
112
        }
113
        if (isset($record['extra']['url'])) {
114
            $message['@source_path'] = $record['extra']['url'];
115
        }
116
        if (!empty($record['extra'])) {
117
            foreach ($record['extra'] as $key => $val) {
118
                $message['@fields'][$this->extraPrefix . $key] = $val;

web/ckfinder/core/connector/php/vendor/monolog/monolog/src/Monolog/Formatter/WildfireFormatter.php 2 locations

@@ 48-51 (lines=4) @@
45
    {
46
        // Retrieve the line and file if set and remove them from the formatted extra
47
        $file = $line = '';
48
        if (isset($record['extra']['file'])) {
49
            $file = $record['extra']['file'];
50
            unset($record['extra']['file']);
51
        }
52
        if (isset($record['extra']['line'])) {
53
            $line = $record['extra']['line'];
54
            unset($record['extra']['line']);
@@ 52-55 (lines=4) @@
49
            $file = $record['extra']['file'];
50
            unset($record['extra']['file']);
51
        }
52
        if (isset($record['extra']['line'])) {
53
            $line = $record['extra']['line'];
54
            unset($record['extra']['line']);
55
        }
56
57
        $record = $this->normalize($record);
58
        $message = array('message' => $record['message']);