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

Class: EmptyStatementSniff

Source Location: /PHP_CodeSniffer-3.1.1/src/Standards/Generic/Sniffs/CodeAnalysis/EmptyStatementSniff.php

Class Overview


This sniff class detected empty statement.


Author(s):

Copyright:

  • 2007-2014 Manuel Pichler. All rights reserved.

Methods


Inherited Variables

Inherited Methods


Class Details

[line 30]
This sniff class detected empty statement.

This sniff implements the common algorithm for empty statement body detection. A body is considered as empty if it is completely empty or it only contains whitespace characters and/or comments.

  1.  stmt {
  2.    // foo
  3.  }
  4.  stmt (conditions{
  5.    // foo
  6.  }



[ Top ]


Method Detail

process   [line 66]

void process( File $phpcsFile, int $stackPtr)

Processes this test, when one of its tokens is encountered.
  • Access: public

Parameters:

\PHP_CodeSniffer\Files\File   $phpcsFile   —  The file being scanned.
int   $stackPtr   —  The position of the current token in the stack passed in $tokens.

[ Top ]

register   [line 39]

int[] register( )

Registers the tokens that this sniff wants to listen for.
  • Access: public

[ Top ]


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