Skip to content
This repository was archived by the owner on Jul 12, 2020. It is now read-only.

Coding style #57

Open
tomphp opened this issue Jan 28, 2014 · 2 comments
Open

Coding style #57

tomphp opened this issue Jan 28, 2014 · 2 comments

Comments

@tomphp
Copy link
Contributor

tomphp commented Jan 28, 2014

I think some thought needs to be had about coding style.

Currently local variable to instance variable adds a variable directly under the last instance variable with a single blank line below.

This often leads to multiple blank lines added below if one already exists, this is a simple bug to fix (I'll do that one shortly).

My issue however is I like a blank line above as my instance variables generate have a docblock so I like my definitions like so:

/**
 * @var string
 */
private $name;

/**
 * @var int
 */
private $age

However I'm guess it currently goes directly underneath as whoever implemented that feature styles there code that way? I'm guessing like so:

private $name;
private $age;

Neither of these are right or wrong but it's got me thinking that maybe we need an approach to generate the refactors in different coding styles? Anyone have any thoughts on this? Maybe having a config file which defines your preferred style rules?

@bnppl
Copy link

bnppl commented Apr 14, 2014

I think this would be a great addition. Perhaps it could use something like this http://editorconfig.org/

@beberlei
Copy link
Contributor

Sounds like a good idea.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants