debug() public static method

Returns a reader-friendly output for debug purpose.
public static debug ( $content ) : string
return string the unparsed file.
Example #1
0
     expect($parsed->uses)->toBe(['A' => 'Kahlan\\A', 'B' => 'Kahlan\\B', 'C' => 'Kahlan\\C', 'F' => 'Kahlan\\E', 'StandardClass' => 'stdClass', 'ClassA' => 'Foo\\Bar\\Baz\\ClassA', 'ClassB' => 'Foo\\Bar\\Baz\\ClassB', 'ClassD' => 'Foo\\Bar\\Baz\\Fuz\\ClassC']);
     $parsed = Parser::parse($content);
     expect(Parser::unparse($parsed))->toBe($content);
 });
 it("parses ::class syntax", function () {
     $filename = 'spec/Fixture/Jit/Parser/StaticClassKeyword';
     $content = file_get_contents($filename . '.php');
     $parsed = Parser::debug($content);
     expect($parsed)->toBe(file_get_contents($filename . '.txt'));
     $parsed = Parser::parse($content);
     expect(Parser::unparse($parsed))->toBe($content);
 });
 it("parses anonymous class", function () {
     $filename = 'spec/Fixture/Jit/Parser/AnonymousClass';
     $content = file_get_contents($filename . '.php');
     $parsed = Parser::debug($content);
     expect($parsed)->toBe(file_get_contents($filename . '.txt'));
     $parsed = Parser::parse($content);
     expect(Parser::unparse($parsed))->toBe($content);
 });
 it("parses extends", function () {
     $sample = file_get_contents('spec/Fixture/Jit/Parser/Extends.php');
     $root = Parser::parse($sample);
     $check = 0;
     foreach ($root->tree as $node) {
         if ($node->type !== 'namespace') {
             continue;
         }
         expect($node->name)->toBe('Test');
         foreach ($node->tree as $node) {
             if ($node->type !== 'class') {