Security update for Core, with self-updated composer
[yaffs-website] / vendor / nikic / php-parser / test / bootstrap.php
1 <?php
2
3 namespace PhpParser;
4
5 require __DIR__ . '/../vendor/autoload.php';
6
7 function canonicalize($str) {
8     // normalize EOL style
9     $str = str_replace("\r\n", "\n", $str);
10
11     // trim newlines at end
12     $str = rtrim($str, "\n");
13
14     // remove trailing whitespace on all lines
15     $lines = explode("\n", $str);
16     $lines = array_map(function($line) {
17         return rtrim($line, " \t");
18     }, $lines);
19     return implode("\n", $lines);
20 }