On Tue, Jun 21, 2011 at 10:11 AM, Michal Čihař
<michal(a)cihar.com> wrote:
Hi
Dne Mon, 20 Jun 2011 17:55:57 +0200
Tyron Madlener <tyronx(a)gmail.com> napsal(a):
Since they are all in the same format and unique
we could just run a
regexp over all pma php files that removes those lines.
Something like this (untested):
replace('.');
function replace($dir) {
$rdir = opendir($dir);
while($file=readdir($rdir)) {
if(is_dir($dir.'/'.$file) && $file!='.' &&
$file!='..')
replace($dir.'/'.$file);
else {
$text = file_get_contents($file);
$fp = fopen($file,'w');
fwrite($fp, preg_replace("/^\s*\*\s*(a)uses.*/m",'',$text))'',$text));
fclose($fp);
}
}
Well there are many ways to remove it, but the question is whether we
want to :-).
PS: I would rather use:
find . -name '*.php' | xargs sed -i '/^[[:space:]]*\* @uses /D'
Well that one liner totally owns my php code snippet of course :(
I'd also agree in removing those, the time invested in keeping them
up-to-date is probably greater than any time advantages gained in
having them.