Skip to content
Snippets Groups Projects
Commit cc0b80d6 authored by Peter Philipp's avatar Peter Philipp
Browse files

Merge remote branch 'remotes/fork/master'

Conflicts:
	Docs/Files/IncludingFileStandard.xml
	Docs/Files/LineLengthStandard.xml
	Docs/Functions/FunctionCallArgumentSpacingStandard.xml
	Docs/Functions/FunctionCallSignatureStandard.xml
	Docs/Functions/ValidDefaultValueStandard.xml
	Docs/NamingConventions/ValidClassNameStandard.xml
	Docs/NamingConventions/ValidFunctionNameStandard.xml
	README.txt
	Sniffs/Array/ArraySniff.php
	Sniffs/Classes/ClassCreateInstanceSniff.php
	Sniffs/Classes/ClassDeclarationSniff.php
	Sniffs/Commenting/ClassCommentSniff.php
	Sniffs/Commenting/FileCommentSniff.php
	Sniffs/Commenting/FunctionCommentSniff.php
	Sniffs/Commenting/InlineCommentSniff.php
	Sniffs/ControlStructures/ControlSignatureSniff.php
	Sniffs/ControlStructures/ElseIfSniff.php
	Sniffs/ControlStructures/InlineControlStructureSniff.php
	Sniffs/ControlStructures/MultiLineConditionSniff.php
	Sniffs/Files/IncludingFileSniff.php
	Sniffs/Files/LineEndingsSniff.php
	Sniffs/Files/LineLengthSniff.php
	Sniffs/Formatting/ItemAssignmentSniff.php
	Sniffs/Formatting/MultiLineAssignmentSniff.php
	Sniffs/Formatting/SpaceAfterCastSniff.php
	Sniffs/Formatting/SpaceOperatorSniff.php
	Sniffs/Formatting/SpaceUnaryOperatorSniff.php
	Sniffs/Functions/FunctionCallArgumentSpacingSniff.php
	Sniffs/Functions/FunctionCallSignatureSniff.php
	Sniffs/Functions/FunctionDeclarationSniff.php
	Sniffs/Functions/ValidDefaultValueSniff.php
	Sniffs/NamingConventions/ValidClassNameSniff.php
	Sniffs/NamingConventions/ValidFunctionNameSniff.php
	Sniffs/NamingConventions/ValidVariableNameSniff.php
	Sniffs/Strings/ConcatenationSpacingSniff.php
	Sniffs/WhiteSpace/ObjectOperatorIndentSniff.php
	Sniffs/WhiteSpace/ScopeClosingBraceSniff.php
	Sniffs/WhiteSpace/ScopeIndentSniff.php
	ruleset.xml
parents 6fe979fb 2472bf83
Branches
Tags
No related merge requests found
......@@ -24,6 +24,8 @@ if (class_exists('PEAR_Sniffs_Commenting_FileCommentSniff', true) === false) {
throw new PHP_CodeSniffer_Exception($error);
}
include_once('FileCommentSniff.php');
/**
* Parses and verifies the doc comments for classes.
*
......
......@@ -41,7 +41,7 @@ class Drupal_Sniffs_Files_LineLengthSniff extends Generic_Sniffs_Files_LineLengt
*
* @var int
*/
public $lineLimit = 80;
public $lineLimit = 80;
/**
* The limit that the length of a line must not exceed.
......
......@@ -126,7 +126,7 @@ class Drupal_Sniffs_WhiteSpace_ObjectOperatorIndentSniff implements PHP_CodeSnif
$foundIndent = 0;
}
if ($foundIndent != $requiredIndent) {
if ($foundIndent !== ($requiredIndent-2)) {
$error = "Object operator not indented correctly; expected $requiredIndent spaces but found $foundIndent";
$phpcsFile->addError($error, $next);
}
......
......@@ -36,7 +36,7 @@ if (class_exists('Generic_Sniffs_WhiteSpace_ScopeIndentSniff', true) === false)
*/
class Drupal_Sniffs_WhiteSpace_ScopeIndentSniff extends Generic_Sniffs_WhiteSpace_ScopeIndentSniff
{
/**
* The number of spaces code should be indented.
*
......
<?xml version="1.0"?>
<ruleset name="Drupal">
<description>A coding standard based on the Drupal coding standard.</description>
<!-- Include some sniffs from all around the place -->
<rule ref="Generic.NamingConventions.UpperCaseConstantName"/>
<rule ref="Generic.Functions.OpeningFunctionBraceKernighanRitchie"/>
<rule ref="Generic.PHP.UpperCaseConstant"/>
<rule ref="Generic.PHP.NoSilencedErrors"/>
<rule ref="Generic.PHP.DisallowShortOpenTag"/>
<rule ref="Generic.WhiteSpace.DisallowTabIndent"/>
<rule ref="Generic.Formatting.SpaceAfterCast"/>
<rule ref="PEAR.WhiteSpace.ScopeClosingBrace"/>
<rule ref="MySource.Debug.DebugCode"/>
<!-- Lines can be 80 chars long, show errors at 120 chars -->
<rule ref="Generic.Files.LineLength">
<properties>
<property name="lineLimit" value="80"/>
<property name="absoluteLineLimit" value="120"/>
</properties>
</rule>
<!-- Use Unix newlines -->
<rule ref="Generic.Files.LineEndings">
<properties>
<property name="eolChar" value="\n"/>
</properties>
</rule>
<description>Drupal coding standard</description>
<rule ref="Generic.NamingConventions.UpperCaseConstantName" />
<rule ref="Generic.PHP.UpperCaseConstant" />
<rule ref="Generic.PHP.DisallowShortOpenTag" />
<rule ref="Generic.WhiteSpace.DisallowTabIndent" />
<rule ref="Generic.Functions.OpeningFunctionBraceKernighanRitchie" />
<rule ref="Generic.WhiteSpace.DisallowTabIndent" />
<rule ref="Generic.Formatting.SpaceAfterCast" />
<rule ref="Generic.PHP.NoSilencedErrors" />
<rule ref="MySource.Debug.DebugCode" />
</ruleset>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment