Created
April 5, 2012 01:10
-
-
Save koriym/2307109 to your computer and use it in GitHub Desktop.
PSR-1 formart.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Converted about PHP files from dos format to unix format: | |
for file in $(find . -name *.php); do dos2unix $file; done; | |
Expanded all multi-line use statements. | |
for file in $(find . -name "*.php"); do php -r 'file_put_contents($argv[1],preg_replace_callback("(use (\s*[a-zA-Z0-9\\\\]+(\s*as[\sa-zA-Z0-9]+)?[,;])+)",function($m){return preg_replace("(,\s*([^,;]+))",";\nuse \\1",$m[0]);},file_get_contents($argv[1])));' $file; done; | |
Removed all trailing whitespaces. | |
for file in $(find . -type f | grep -v \.git); do sed -i -E 's/[[:space:]]*$//' $file; done; | |
--- | |
https://github.com/zendframework/zf2/pull/1001 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment