Add 'clone' and 'echo' to the list of known PHP statements to avoid the use of parenthesis. #63

Merged
merged 1 commit into from Mar 1, 2014

Conversation

Projects
None yet
2 participants
@elkuku
Member

elkuku commented Feb 28, 2014

Bad:

$foo = clone(FOO);
echo('foo');

Good:

$foo = clone FOO;
echo 'foo';
@dongilbert

This comment has been minimized.

Show comment
Hide comment
@dongilbert

dongilbert Feb 28, 2014

Contributor

Hrm, should this be here in the IncludingFilesSniff? Or create a new LanguageConstructsSniff or something like that?

Contributor

dongilbert commented Feb 28, 2014

Hrm, should this be here in the IncludingFilesSniff? Or create a new LanguageConstructsSniff or something like that?

Add 'clone' and 'echo' to the list of known PHP statements to avoid t…
…he use of parenthesis.

Move the sniff to a proper file and remove obsolete code.
@elkuku

This comment has been minimized.

Show comment
Hide comment
@elkuku

elkuku Mar 1, 2014

Member

It was out of laziness, but you are obviously right, so I moved the code to a proper sniff and removed the rest that had been disabled long ago.

Member

elkuku commented Mar 1, 2014

It was out of laziness, but you are obviously right, so I moved the code to a proper sniff and removed the rest that had been disabled long ago.

dongilbert added a commit that referenced this pull request Mar 1, 2014

Merge pull request #63 from elkuku/statement-not-function
Add 'clone' and 'echo' to the list of known PHP statements to avoid the use of parenthesis.

@dongilbert dongilbert merged commit 04908e2 into joomla:master Mar 1, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment