Jump to content

PHPWasher (cleans up your PHP code)


Vinze

Recommended Posts

I tryed it online, it did not work.

 

why? what happened? what errors? what file did you try?

 

please be more specific with your posts - and not just this one.

 

Indeed, it would be far more helpful for me. I might not be able to work on PHPWasher now, but I'll look into everything later, so it'd be helpful if you posted the code you tried.

Link to comment
Share on other sites

I'm sorry to say, but honestly... I think it was pretty ugly.

 

It made more of a mess of my script than I already had.

 

Could you post the script you inserted?

 

I'm a bit busy at the moment, but when I have time again I'll check back to this thread and try to solve all problems.

 

I just used:

<?php
$x = "test";
if($x == $y){
echo "TEST";
}
?>

Link to comment
Share on other sites

I'm sorry to say, but honestly... I think it was pretty ugly.

 

It made more of a mess of my script than I already had.

 

Could you post the script you inserted?

 

I'm a bit busy at the moment, but when I have time again I'll check back to this thread and try to solve all problems.

 

I just used:

<?php
$x = "test";
if($x == $y){
echo "TEST";
}
?>

 

That's weird, because except for an additional tab in front of ?> it worked fine for me.

Link to comment
Share on other sites

I guess it is just my opinion of how I think code should be indented.  I guess I can see how some people do different styles of indentation which this fits.

 

Ah, right, that's why you can configure that in the downloaded version. Guess I should also do that for the online version. What exactly would you like to have different? You can already change indentation method (e.g. to four spaces) or put the opening accolades on a separate line.

Link to comment
Share on other sites

Here was the full script I used (This is a direct copy from the washer):

 

$y = 10;

$x = $y;

echo $x;

if($x == $y){

    echo "omg";

    if($y == 10){

        echo "OMG2";

       

    }

   

}

 

Okay, makes sense but...  I like to have it so that it would be like this:

 

$y = 10;

$x = $y;

echo $x;

  if($x == $y){

  echo "omg";

      if($y == 10){

      echo "OMG2"; 

      }   

  }

 

See, as a personal preference I keep the Ifs lined up with it's output.  But your PHP washer doesn't seem to give me that option.  Also, one slight thing is:

 

The output of the first line is like this:

test.txt: <?php

 

I think it should be:

 

test.txt:

<?php

 

Or even without the underline, but on a separate line.

Link to comment
Share on other sites

Here was the full script I used (This is a direct copy from the washer):

 

$y = 10;

$x = $y;

echo $x;

if($x == $y){

    echo "omg";

    if($y == 10){

        echo "OMG2";

       

    }

   

}

 

Okay, makes sense but...  I like to have it so that it would be like this:

 

$y = 10;

$x = $y;

echo $x;

  if($x == $y){

  echo "omg";

      if($y == 10){

      echo "OMG2"; 

      }   

  }

 

See, as a personal preference I keep the Ifs lined up with it's output.  But your PHP washer doesn't seem to give me that option.

 

Hmm, that's interesting. Once I get to work on it again I'll add that option, it's not that difficult.

  Also, one slight thing is:

 

The output of the first line is like this:

test.txt: <?php

 

I think it should be:

 

test.txt:

<?php

 

Or even without the underline, but on a separate line.

 

I'm aware of that, is also planned to be fixed ;)

Link to comment
Share on other sites

  • 2 weeks later...
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.