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

Class: DisallowShortOpenTagSniff

Source Location: /PHP_CodeSniffer-3.1.1/src/Standards/Generic/Sniffs/PHP/DisallowShortOpenTagSniff.php

Class Overview


Makes sure that shorthand PHP open tags are not used.


Author(s):

Copyright:

  • 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600)

Methods


Inherited Variables

Inherited Methods


Class Details

[line 16]
Makes sure that shorthand PHP open tags are not used.


[ Top ]


Method Detail

getSnippet   [line 147]

string getSnippet( string $content, [string $start = ''], [int $length = 40])

Get a snippet from a HTML token.
  • Access: protected

Parameters:

string   $content   —  The content of the HTML token.
string   $start   —  Partial string to use as a starting point for the snippet.
int   $length   —  The target length of the snippet to get. Defaults to 40.

[ Top ]

process   [line 51]

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 25]

array register( )

Returns an array of tokens this test wants to listen for.
  • Access: public

[ Top ]


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