private static function extractHeaders(array $headers, array $entries): array
    {
        $currentHeader = null;

        foreach ($headers as $header) {
            $header = \trim($header);
            $header = self::convertString($header);

            if ($header === '') {
                continue;
            }

            if (self::isHeaderDefinition($header)) {
                $header                             = \explode(':', $header, 2);
                $currentHeader                      = \trim($header[0]);
                $entries['headers'][$currentHeader] = \trim($header[1]);
            } else {
                $entries['headers'][$currentHeader] = [$entries['headers'][$currentHeader] ?? '', \trim($header)];
            }
        }

        return $entries;
    }
private static function extractHeaders(array $headers, array $entries): array
    {
        $currentHeader = null;

        foreach ($headers as $header) {
            $header = \trim($header);
            $header = self::convertString($header);

            if ($header === '') {
                continue;
            }

            if (self::isHeaderDefinition($header)) {
                $header                             = \explode(':', $header, 2);
                $currentHeader                      = \trim($header[0]);
                $entries['headers'][$currentHeader] = \trim($header[1]);
            } else {
                $entries['headers'][$currentHeader] = [$entries['headers'][$currentHeader] ?? '', \trim($header)];
            }
        }

        return $entries;
    }
private static function extractHeaders ( array $ headers , array $ entries ) : array { $ currentHeader = null ; foreach ( $ headers as $ header ) { $ header = \ trim ( $ header ) ; $ header = self :: convertString ( $ header ) ; if ( $ header === '' ) { continue ; } if ( self :: isHeaderDefinition ( $ header ) ) { $ header = \ explode ( ':' , $ header , 2 ) ; $ currentHeader = \ trim ( $ header [ 0 ] ) ; $ entries [ 'headers' ] [ $ currentHeader ] = \ trim ( $ header [ 1 ] ) ; } else { $ entries [ 'headers' ] [ $ currentHeader ] = [ $ entries [ 'headers' ] [ $ currentHeader ] ?? '' , \ trim ( $ header ) ] ; } } return $ entries ; }
Add the headers found to the translations instance.

@param array $headers
@param array $entries

@return array
Add the headers found to the translations instance .