Git Product home page Git Product logo

netbeans-psr-formatting's Introduction

PSR auto-formatting for NetBeans

This repository provides source code auto-formatting settings for PHP PSR1 and PSR2 standards.

Although NetBeans does not provide automatic formatting support for all of the PSR1 and PSR2 'rules' (eg. refactoring class and method name case) I have done my best to implement as much as possible.

The result of using this configuration is, once imported you can then use the Source > Format function (ALT+SHIFT+F on Windows and Linux) or (CTRL+SHIFT+F on Mac) in NetBeans the PHP code will automatically be formatted to match PSR1/PSR2 syntax format.

Requirements

  • NetBeans (Tested and developed on v8.0.2 but should work fine on other versions too!)

License

All things have a license I guess, so keeping it plain and simple, these files are released under the MIT license.

Support

I am happy to provide support via. my personal email address, so if you need a hand or want to give me some feedback feel free to drop me an email at: [email protected].

Installation

  • Download the latest release to your machine.
  • Open up the NetBeans IDE on your computer
  • From the top menu, click on Tools and then from the menu that appears click Options
  • When the Options window appears click on the Import button at the bottom left.
  • When the Import window appears click on the Browse button and select the downloaded zip archive that you downloaded in the first step.
  • Under the Select options to import:, check the All check box and then click Ok and then Apply.
  • You should then be prompted to restart the IDE, restart and enjoy your new auto-formatting skills ;)

Preparing the source code for 'import'

In order to import the settings into NetBeans, compress the root directory of the src directory into a zip file of which can then be used to import into NetBeans as shown below in the installation guide.

netbeans-psr-formatting's People

Contributors

allebb avatar mskarupianski avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.