src/Reflection/ReflectionClass.php
private function parseHereNowDocConcat($loc): ?string
    {
        $tokens = $this->getTokenStream();
        $type   = substr($tokens->value($loc), 3, 1);
        $loc    = $tokens->next($loc);

        if ($loc) {
            $string = substr($tokens->value($loc), 0, -1);
            if ($type === '\'') {
                return '\'' . implode('\' . "\n" . \'', explode("\n", $string)) . '\'';
            }

            return '"' . str_replace("\n", '\n', $string) . '"';
        }

        return null;
    }
private function parseHereNowDocConcat($loc): ?string
    {
        $tokens = $this->getTokenStream();
        $type   = substr($tokens->value($loc), 3, 1);
        $loc    = $tokens->next($loc);

        if ($loc) {
            $string = substr($tokens->value($loc), 0, -1);
            if ($type === '\'') {
                return '\'' . implode('\' . "\n" . \'', explode("\n", $string)) . '\'';
            }

            return '"' . str_replace("\n", '\n', $string) . '"';
        }

        return null;
    }
private function parseHereNowDocConcat ( $ loc ) : ? string { $ tokens = $ this -> getTokenStream ( ) ; $ type = substr ( $ tokens -> value ( $ loc ) , 3 , 1 ) ; $ loc = $ tokens -> next ( $ loc ) ; if ( $ loc ) { $ string = substr ( $ tokens -> value ( $ loc ) , 0 , - 1 ) ; if ( $ type === '\'' ) { return '\'' . implode ( '\' . "\n" . \'' , explode ( "\n" , $ string ) ) . '\'' ; } return '"' . str_replace ( "\n" , '\n' , $ string ) . '"' ; } return null ; }
Parse heredoc and nowdoc into a concatenated string representation to be
useful for default values and inline assignment.

@param int $loc

@return string|null
Parse heredoc and nowdoc into a concatenated string representation to be useful for default values and inline assignment .