Skip to content

cleanContent obliterates entire classes when it mistakes a quote inside a comment for the start of a string #7

@ExplodingCabbage

Description

@ExplodingCabbage

Calling cleanContent on this file...

<?php namespace Foo;

// By the gods' wounds, this was an annoying bug!
class Bla {
  public function helloWorld() {
    return 'hello world';
  }
}

will result in this:

<?php namespace Foo;


  }
}

and as a result parseFileWithRegexForDefinedEntities will later fail to find the Foo class.

I'd be happy to apply some regex wizardry to find a way to clean this up, but it's very difficult to do so at the moment because cleanContent is completely undocumented and I dunno for sure what stuff it's supposed to be removing from the file content.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions