Open jbrooksuk opened 10 years ago
I like the idea, to be able to process any given string would be cool.
We will need to cleanup a few things I think. The "processFiles" method set up some variables and flags (current file name, ...). We can check if we have consistent defaut values for these flags, and when possible eliminate or move all these variables.
When I was looking at doing this, I realised that processFiles
does too much in one method:
We could split out some methods so that they can be re-used by a process
method.
Agree, there is some cleanup to do.
I started looking at this, but quickly realised that there are a lot of changes required.
Tokenizer@tokenize
takes a file name for example.PHPCheckstyle@processFiles
calls _processFile
which assume it's a file.This requires a big rewrite of the core methods.
Currently PHPCheckstyle is only able to check the style guides against files and not a string itself.
Rather than messing with
processFiles
, I'm thinking of adding justprocess
as a method itself. This gives the end-developer much more flexibility.