Skip to content

Better documentation of differences from core standards#106

Merged
mbabker merged 1 commit intojoomla:masterfrom
photodude:patch-3
Apr 12, 2015
Merged

Better documentation of differences from core standards#106
mbabker merged 1 commit intojoomla:masterfrom
photodude:patch-3

Conversation

@photodude
Copy link
Copy Markdown
Contributor

  • Try to include some better documentation of differences from core standards to help with current and future PHPCS migration tasks
  • Remove IncludeFileSniff this is no longer part of the Joomla standard
  • Replace LineLenghtSniff reference with ruleset.xml definition, LineLenghtSniff is no longer part of the Joomla standard
  • No need to reference core standard sniffs not included in the joomla/coding-standards, remove reference to ScopeIndentSniff and IncludeFileSniff
  • Where it is known, specify the standard the joomla/coding-standards are based on
  • add references to all sniffs that are customized as a Joomla sniff

- Try to include some better documentation of differences from core standards to help with current and future PHPCS migration tasks
- Remove IncludeFileSniff this is no longer part of the Joomla standard
- Replace LineLenghtSniff reference with ruleset.xml definition, LineLenghtSniff is no longer part of the Joomla standard
- No need to reference core standard sniffs not included in the joomla/coding-standards, remove reference to ScopeIndentSniff and IncludeFileSniff
- Where it is known, specify the standard the joomla/coding-standards are based on 
- add references to all sniffs that are customized as a Joomla sniff
@photodude photodude deleted the patch-3 branch April 12, 2015 17:41
photodude added a commit to photodude/coding-standards that referenced this pull request Apr 13, 2015
photodude added a commit to photodude/coding-standards that referenced this pull request Apr 24, 2015
Increased notional limit to 150 chars.

Reorder to better match the Squiz/ruleset.xml

This improves readability when migrating versions
Also increased the max line the comment to 150 chars long since it was that way in the code

Match Squiz standard CastSpacingSniff.php

- Since we are not making any specific changes here, this file should likely be eliminated and just include the Squiz standard

add Squiz.WhiteSpace.CastSpacingSniff rule so duplication can be eliminated.

This file is identical to the Squiz standard CastSpacingSniff.php

- added rule to the ruleset and delete the unnecessary file

rebuild from source with modifications

- add T_FUNCTION, and T_CLASS, to array of tokens
- remove parenthesis_opener checks (as was done previously)
- add T_COMMENT and T_WHILE to the $tokens[$trailingContent] checks (as was done previously)

nothing special here, replace with generic rule

add Generic.WhiteSpace.DisallowSpaceIndentSniff rule

This is now a Joomla class sniff

nothing special here, replace with generic rule

- add Generic.PHP.LowerCaseConstantSniff rule

nothing special here, replace with Squiz rule

nothing special here, replace with Squiz rule

nothing special here, replace with PEAR rule

Update rules to use source standards to eliminate unnecessary duplication

add comment about the removed section "parenthesis_opener"

- by adding a comment about what was intentionally removed we will help the coding standard be able to make changes quicker when the source standard changes or has bug fixes applied.

T_DOC_COMMENT token has also been removed

The T_DOC_COMMENT token has also been removed, replaced instead by T_DOC_COMMENT_OPEN_TAG

T_DOC_COMMENT token has also been removed

The T_DOC_COMMENT token has also been removed, replaced instead by T_DOC_COMMENT_OPEN_TAG

T_DOC_COMMENT token has been removed

The T_DOC_COMMENT token has been removed, replaced instead by T_DOC_COMMENT_OPEN_TAG

T_DOC_COMMENT token has been removed

The T_DOC_COMMENT token has been removed, replaced instead by T_DOC_COMMENT_OPEN_TAG

T_DOC_COMMENT token has been removed

The T_DOC_COMMENT token has been removed, replaced instead by T_DOC_COMMENT_OPEN_TAG

Add PSR2.ControlStructures.ElseIfDeclaration rule

Replace with PSR2.ControlStructures.ElseIfDeclaration rule

Sniff is not part of the rule names

copy PR joomla#106 Better documentation of differences from core standards
photodude added a commit to photodude/coding-standards that referenced this pull request Apr 25, 2015
Increased notional limit to 150 chars.

Reorder to better match the Squiz/ruleset.xml

This improves readability when migrating versions
Also increased the max line the comment to 150 chars long since it was that way in the code

Match Squiz standard CastSpacingSniff.php

- Since we are not making any specific changes here, this file should likely be eliminated and just include the Squiz standard

add Squiz.WhiteSpace.CastSpacingSniff rule so duplication can be eliminated.

This file is identical to the Squiz standard CastSpacingSniff.php

- added rule to the ruleset and delete the unnecessary file

rebuild from source with modifications

- add T_FUNCTION, and T_CLASS, to array of tokens
- remove parenthesis_opener checks (as was done previously)
- add T_COMMENT and T_WHILE to the $tokens[$trailingContent] checks (as was done previously)

nothing special here, replace with generic rule

add Generic.WhiteSpace.DisallowSpaceIndentSniff rule

This is now a Joomla class sniff

nothing special here, replace with generic rule

- add Generic.PHP.LowerCaseConstantSniff rule

nothing special here, replace with Squiz rule

nothing special here, replace with Squiz rule

nothing special here, replace with PEAR rule

Update rules to use source standards to eliminate unnecessary duplication

add comment about the removed section "parenthesis_opener"

- by adding a comment about what was intentionally removed we will help the coding standard be able to make changes quicker when the source standard changes or has bug fixes applied.

T_DOC_COMMENT token has also been removed

The T_DOC_COMMENT token has also been removed, replaced instead by T_DOC_COMMENT_OPEN_TAG

T_DOC_COMMENT token has also been removed

The T_DOC_COMMENT token has also been removed, replaced instead by T_DOC_COMMENT_OPEN_TAG

T_DOC_COMMENT token has been removed

The T_DOC_COMMENT token has been removed, replaced instead by T_DOC_COMMENT_OPEN_TAG

T_DOC_COMMENT token has been removed

The T_DOC_COMMENT token has been removed, replaced instead by T_DOC_COMMENT_OPEN_TAG

T_DOC_COMMENT token has been removed

The T_DOC_COMMENT token has been removed, replaced instead by T_DOC_COMMENT_OPEN_TAG

Add PSR2.ControlStructures.ElseIfDeclaration rule

Replace with PSR2.ControlStructures.ElseIfDeclaration rule

Sniff is not part of the rule names

copy PR joomla#106 Better documentation of differences from core standards
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants