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

Class: ByteOrderMarkSniff

Source Location: /PHP_CodeSniffer-3.1.1/src/Standards/Generic/Sniffs/Files/ByteOrderMarkSniff.php

Class Overview


A simple sniff for detecting BOMs that may corrupt application work.


Author(s):

Copyright:

  • 2010-2014 mediaSELF Sp. z o.o.

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 16]
A simple sniff for detecting BOMs that may corrupt application work.


[ Top ]


Class Variables

$bomDefinitions = array(
                                 'UTF-8'       => 'efbbbf',
                                 'UTF-16 (BE)' => 'feff',
                                 'UTF-16 (LE)' => 'fffe',
                                )

[line 26]

List of supported BOM definitions.

Use encoding names as keys and hex BOM representations as values.

  • Access: protected

Type:   array


[ Top ]



Method Detail

process   [line 54]

void process( File $phpcsFile, int $stackPtr)

Processes this sniff, 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 38]

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:15 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.