diff --git a/coder_sniffer/Drupal/Sniffs/Classes/ClassCreateInstanceSniff.php b/coder_sniffer/Drupal/Sniffs/Classes/ClassCreateInstanceSniff.php index 0c51219ddae7fd7c3e838fed4df42734d6f0ee51..281a43eb50208e10ef63f94559a234fedf4ca3cf 100644 --- a/coder_sniffer/Drupal/Sniffs/Classes/ClassCreateInstanceSniff.php +++ b/coder_sniffer/Drupal/Sniffs/Classes/ClassCreateInstanceSniff.php @@ -45,7 +45,7 @@ class Drupal_Sniffs_Classes_ClassCreateInstanceSniff implements PHP_CodeSniffer_ { $tokens = $phpcsFile->getTokens(); - // Search for an opening parenthesis in the current statement untill the + // Search for an opening parenthesis in the current statement until the // next semicolon. $nextParenthesis = $phpcsFile->findNext(T_OPEN_PARENTHESIS, $stackPtr, null, false, null, true); // If there is a parenthesis owner then this is not a constructor call, diff --git a/coder_sniffer/Drupal/Sniffs/Commenting/FunctionCommentSniff.php b/coder_sniffer/Drupal/Sniffs/Commenting/FunctionCommentSniff.php index 278ec35556cc0aa65706fe252a37d30af273c338..61d8972225fa87199c8b58099870d23fc1373a80 100644 --- a/coder_sniffer/Drupal/Sniffs/Commenting/FunctionCommentSniff.php +++ b/coder_sniffer/Drupal/Sniffs/Commenting/FunctionCommentSniff.php @@ -589,8 +589,8 @@ class Drupal_Sniffs_Commenting_FunctionCommentSniff implements PHP_CodeSniffer_S // Make sure the param name is correct. $matched = false; - // Parameter documentation can be ommitted for some parameters, so - // we have to search the rest for a match. + // Parameter documentation can be omitted for some parameters, so we have + // to search the rest for a match. $realName = '<undefined>'; while (isset($realParams[($checkPos)]) === true) { $realName = $realParams[$checkPos]['name']; diff --git a/coder_sniffer/Drupal/Sniffs/Commenting/HookCommentSniff.php b/coder_sniffer/Drupal/Sniffs/Commenting/HookCommentSniff.php index 7ba8719df27bd87e0975d20d92d8bee5409cd64f..f2fa4f01d65c0ed2283bdd9919f1801b5779d1d4 100644 --- a/coder_sniffer/Drupal/Sniffs/Commenting/HookCommentSniff.php +++ b/coder_sniffer/Drupal/Sniffs/Commenting/HookCommentSniff.php @@ -84,7 +84,7 @@ class Drupal_Sniffs_Commenting_HookCommentSniff implements PHP_CodeSniffer_Sniff } } - // Check if hook implementation doc is formated correctly. + // Check if a hook implementation doc block is formatted correctly. if (preg_match('/^[\s]*Implement[^\n]+?hook_[^\n]+/i', $shortContent, $matches) === 1) { if (strstr($matches[0], 'Implements ') === false || strstr($matches[0], 'Implements of') !== false || preg_match('/ (drush_)?hook_[a-zA-Z0-9_]+\(\)( for .+)?\.$/', $matches[0]) !== 1 diff --git a/coder_sniffer/Drupal/Sniffs/Semantics/FunctionAliasSniff.php b/coder_sniffer/Drupal/Sniffs/Semantics/FunctionAliasSniff.php index e5f9a4e748a0aea7c90f9c571ebf69c8918ab89f..a19f5258f63e0b948b486d08df599bbf14f7233e 100644 --- a/coder_sniffer/Drupal/Sniffs/Semantics/FunctionAliasSniff.php +++ b/coder_sniffer/Drupal/Sniffs/Semantics/FunctionAliasSniff.php @@ -18,7 +18,7 @@ class Drupal_Sniffs_Semantics_FunctionAliasSniff extends Drupal_Sniffs_Semantics { /** - * Holds all PHP funtion name aliases (keys) and orginals (values). See + * Holds all PHP function name aliases (keys) and originals (values). See * http://php.net/manual/en/aliases.php * * @var array diff --git a/coder_sniffer/Drupal/Test/good/good.php b/coder_sniffer/Drupal/Test/good/good.php index 8a71c7f3044a59a73e35516052f782fce44bcae2..d8fcfa39633ddd3f2b4a75de373f8ef88128466b 100644 --- a/coder_sniffer/Drupal/Test/good/good.php +++ b/coder_sniffer/Drupal/Test/good/good.php @@ -1247,7 +1247,7 @@ function test11() { } /** - * Paramter docs with a long nested list. + * Parameter docs with a long nested list. * * @param string $a * Lists are usually preceded by a line ending in a colon: diff --git a/coder_sniffer/DrupalPractice/Sniffs/CodeAnalysis/VariableAnalysisSniff.php b/coder_sniffer/DrupalPractice/Sniffs/CodeAnalysis/VariableAnalysisSniff.php index 40bf05874f9f278672327e50ff6366157a995345..6a929dd39ac283b767bf13f952b263cd2ce094b8 100644 --- a/coder_sniffer/DrupalPractice/Sniffs/CodeAnalysis/VariableAnalysisSniff.php +++ b/coder_sniffer/DrupalPractice/Sniffs/CodeAnalysis/VariableAnalysisSniff.php @@ -1314,7 +1314,7 @@ class DrupalPractice_Sniffs_CodeAnalysis_VariableAnalysisSniff implements PHP_Co return false; } - // Are we refering to self:: outside a class? + // Are we referring to self:: outside a class? // TODO: not sure this is our business or should be some other sniff. if (($tokens[$classNamePtr]['code'] === T_SELF) || ($tokens[$classNamePtr]['code'] === T_STATIC) diff --git a/coder_sniffer/DrupalPractice/Sniffs/General/AccessAdminPagesSniff.php b/coder_sniffer/DrupalPractice/Sniffs/General/AccessAdminPagesSniff.php index 4bab453355224ea621c348d284eda803fce34d5b..d279304e85adc6f6f9e77cee3c115cbcd962af9b 100644 --- a/coder_sniffer/DrupalPractice/Sniffs/General/AccessAdminPagesSniff.php +++ b/coder_sniffer/DrupalPractice/Sniffs/General/AccessAdminPagesSniff.php @@ -8,7 +8,7 @@ */ /** - * Throws a waring if the "access adiminstration pages" string is found in + * Throws a warning if the "access administration pages" string is found in * hook_menu(). * * @category PHP diff --git a/coder_sniffer/DrupalPractice/Sniffs/Objects/GlobalFunctionSniff.php b/coder_sniffer/DrupalPractice/Sniffs/Objects/GlobalFunctionSniff.php index 275d43c8ab7e9e3243c35487f4db033c310238e5..d194bdfca7b947ab8b0487146adcd7fd5adf7b6c 100644 --- a/coder_sniffer/DrupalPractice/Sniffs/Objects/GlobalFunctionSniff.php +++ b/coder_sniffer/DrupalPractice/Sniffs/Objects/GlobalFunctionSniff.php @@ -8,7 +8,7 @@ */ /** - * Checks that gloabl functions like t() are not used in forms or controllers. + * Checks that global functions like t() are not used in forms or controllers. * * @category PHP * @package PHP_CodeSniffer @@ -86,7 +86,7 @@ class DrupalPractice_Sniffs_Objects_GlobalFunctionSniff implements PHP_CodeSniff return; } - $warning = '%s() calls should be avoided in classes, use dependency injection and %s instead'; + $warning = '%s() calls should be avoided in classes, use dependency injection and "%s" instead'; $data = array( $tokens[$stackPtr]['content'], $this->functions[$tokens[$stackPtr]['content']], diff --git a/coder_sniffer/DrupalPractice/Test/Commenting/CommentEmptyLineUnitTest.inc b/coder_sniffer/DrupalPractice/Test/Commenting/CommentEmptyLineUnitTest.inc index 0cef66fd18bb69420c0b6e5c45acdca9d22e038a..8c1c5d2f4fcfd19773209ed0688fabaa7139a168 100644 --- a/coder_sniffer/DrupalPractice/Test/Commenting/CommentEmptyLineUnitTest.inc +++ b/coder_sniffer/DrupalPractice/Test/Commenting/CommentEmptyLineUnitTest.inc @@ -1,6 +1,6 @@ <?php -// This comment is flying arround. +// This comment is flying around. foo();