From 8e68acf72174e5d29ba16f9f4314b70f5048a345 Mon Sep 17 00:00:00 2001
From: Klaus Purer <klaus.purer@gmail.com>
Date: Sun, 5 Feb 2017 21:40:47 +0100
Subject: [PATCH] style(spelling): Fixed typos

---
 .../Drupal/Sniffs/Classes/ClassCreateInstanceSniff.php        | 2 +-
 .../Drupal/Sniffs/Commenting/FunctionCommentSniff.php         | 4 ++--
 coder_sniffer/Drupal/Sniffs/Commenting/HookCommentSniff.php   | 2 +-
 coder_sniffer/Drupal/Sniffs/Semantics/FunctionAliasSniff.php  | 2 +-
 coder_sniffer/Drupal/Test/good/good.php                       | 2 +-
 .../Sniffs/CodeAnalysis/VariableAnalysisSniff.php             | 2 +-
 .../DrupalPractice/Sniffs/General/AccessAdminPagesSniff.php   | 2 +-
 .../DrupalPractice/Sniffs/Objects/GlobalFunctionSniff.php     | 4 ++--
 .../Test/Commenting/CommentEmptyLineUnitTest.inc              | 2 +-
 9 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/coder_sniffer/Drupal/Sniffs/Classes/ClassCreateInstanceSniff.php b/coder_sniffer/Drupal/Sniffs/Classes/ClassCreateInstanceSniff.php
index 0c51219d..281a43eb 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 278ec355..61d89722 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 7ba8719d..f2fa4f01 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 e5f9a4e7..a19f5258 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 8a71c7f3..d8fcfa39 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 40bf0587..6a929dd3 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 4bab4533..d279304e 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 275d43c8..d194bdfc 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 0cef66fd..8c1c5d2f 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();
 
-- 
GitLab