PHP_CodeSniffer
[ class tree: PHP_CodeSniffer ] [ index: PHP_CodeSniffer ] [ all elements ]

Source for file FunctionDeclarationSniff.php

Documentation is available at FunctionDeclarationSniff.php

  1. <?php
  2. /**
  3.  * Checks the function declaration is correct.
  4.  *
  5.  * @author    Greg Sherwood <gsherwood@squiz.net>
  6.  * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600)
  7.  * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
  8.  */
  9.  
  10. namespace PHP_CodeSniffer\Standards\Squiz\Sniffs\Functions;
  11.  
  12. use PHP_CodeSniffer\Sniffs\AbstractPatternSniff;
  13.  
  14. class FunctionDeclarationSniff extends AbstractPatternSniff
  15. {
  16.  
  17.  
  18.     /**
  19.      * Returns an array of patterns to check are correct.
  20.      *
  21.      * @return array 
  22.      */
  23.     protected function getPatterns()
  24.     {
  25.         return array(
  26.                 'function abc(...);',
  27.                 'function abc(...)',
  28.                 'abstract function abc(...);',
  29.                );
  30.  
  31.     }//end getPatterns()
  32.  
  33.  
  34. }//end class

Documentation generated on Mon, 11 Mar 2019 15:27:32 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.