Skip to content
This repository has been archived by the owner. It is now read-only.

gabfl/PHP-PSR-2-Fixer-Coda-Plugin

master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 

PHP-PSR-2-Fixer Coda Plugin

Description

PHP PSR-2 Fixer is a coda plugin created to provide a simple interface to automatically fix PHP coding standards issues using PHP_CodeSniffer.

Installation

  • Download the latest version in /releases
  • Extract the archive
  • Double click on PHP PSR-2 Fixer.codaplugin

Usage

Fix standards for an entire file:

  • Use the shortcut ^⇧F (control + shift + F)
  • Make a right click → Plug-insPHP PSR-2 FixerEntire file

Fix standards for the selected code only:

  • Use the shortcut ^⇧S (control + shift + S)
  • Make a right click → Plug-insPHP PSR-2 FixerSelection

Rules applied

When using the plugin, the following rules are applied:

  • Code conversion to PSR-2 standard
  • Remove trailing whitespace at the end of blank lines.
  • Removes extra blank lines in methods.

Requirements

  • Coda >= 2.5
  • PHP 5.6 (bundled in MacOS)

PHP 7.x compatibility

The version of PHP bundled with MacOS is PHP 5.x. To fix PHP code written for PHP 7, you can upgrade the PHP version on MacOS with homebrew using:

brew install homebrew/php/php71

License

This plug-in is under MIT license (view license).

PHP_CodeSniffer license is available here.

Credits

PHP_CodeSniffer is bundled in this plug-in

About

Coda Plugin that uses PHP_CodeSniffer to automatically fix PHP coding standards issues

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published