Skip to content

idwaker/d-phptidy

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 

Repository files navigation

Description

The story:

  1. Magnus Rosenbaum wrote the original phptidy script.
  2. Eoin Gallagher modified it so that it conforms to the WordPress Coding Standards.
  3. scribu put Eoin's version on github, for convenience wp-phptidy.
  4. I modified according to my taste.

Basic usage

$ d-phptidy.php replace some-file.php

Complete documentation can be found on the phptidy home page: http://phptidy.berlios.de/

Modified to use spaces and code as below

class MyClass extends SomeClass
{
    function __construct($arg1, $arg2)
    {
        // do something
    }
    
    function doJob($arg)
    {
        foreach ($variable as $vari) {
            if ($vari == 1) {
                // do this
            }
            elseif ($vari == 2) {
                // do another
            }
            else {
                // do new
            }
        }
        
        do {
            // this is do loop
        } while ($check);
        
        while ($check) {
            // this is while loop
        }
        
        $array = array('Apple', 'Banana', 'Carrot');
    }
}

About

Automatically format PHP code

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%