Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Improve "function __construct" snippet #103

Merged
merged 1 commit into from Nov 9, 2015
Merged

Improve "function __construct" snippet #103

merged 1 commit into from Nov 9, 2015

Conversation

henriquemoody
Copy link
Contributor

  • Create new line after brackets (as PSR-2 recomments)
  • Add visibility to the method (public as default)
  • Add type to the first argument
  • Define a property name as the same of the first argument

The snippet should create something like:

public function __construct(Type $foo = null)
{
    $this->foo = $foo;
}

- Create new line after brackets (as PSR-2 recomments)
- Add visibility to the method (`public` as default)
- Add type to the first argument
- Define a property name as the same of the first argument
@Ingramz
Copy link
Contributor

Ingramz commented Sep 24, 2015

LGTM! 👍

Behaves a lot better than the previous one.

@henriquemoody
Copy link
Contributor Author

It's been a long time since I've opened this pull request, is it going to be merged?

kevinsawicki added a commit that referenced this pull request Nov 9, 2015
Improve "function __construct" snippet
@kevinsawicki kevinsawicki merged commit 8ce4068 into atom:master Nov 9, 2015
@kevinsawicki
Copy link
Contributor

Great, thanks for this, apologies for the delay

@henriquemoody
Copy link
Contributor Author

No problem :)

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

Successfully merging this pull request may close these issues.

None yet

3 participants