GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - phpowermove/php-code-formatter: A code formatting library for php

BranchesTags
Open more actions menu

Latest commit

 

History

34 Commits
34 Commits

Folders and files

NameName
Last commit message
Last commit date
.settings
.settings
 
 
bin
bin
 
 
profiles
profiles
 
 
src
src
 
 
tests
tests
 
 
.gitignore
.gitignore
 
 
.php_cs
.php_cs
 
 
.project
.project
 
 
.travis.yml
.travis.yml
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
composer.json
composer.json
 
 
phpunit.xml.dist
phpunit.xml.dist
 
 
sami.php
sami.php
 
 

Repository files navigation

PHP Code Formatter

License Latest Stable Version Total Downloads
Build Status Scrutinizer Code Quality Code Coverage

A library for formatting php code.

Features

  • Whitespace
  • New lines
  • Indentation (on curly braces only)
  • Blanks (partial support)

-> Wishlist

Getting started

Installation

Via composer:

composer require gossi/php-code-formatter

From Code

This simple code snippet is all you need:

use gossi\formatter\Formatter;

$formatter = new Formatter();
$beautifulCode = $formatter->format($uglyCode);

From CLI

A bare cli version is available:

vendor/bin/phormat path/to/file.php

will output the formatted source code to stdout

Development

php code formatter is not yet finished (see Wishlist). Please help the development, by picking one of the open issues or implement your own rules. See the wiki on creating your own rules.

Psr-2? Spaces suck, deal with it :p Once Version 1.0 is reached, a psr-2 profile will be shipped.

About

A code formatting library for php

Resources

Readme
MIT license
Activity
Custom properties

Stars

31 stars

Watchers

7 watching

Forks

11 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.