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

Class: Squiz_Sniffs_Commenting_FileCommentSniff

Source Location: /PHP_CodeSniffer-0.7.0/CodeSniffer/Standards/Squiz/Sniffs/Commenting/FileCommentSniff.php

Class Overview


Parses and verifies the file doc comment.


Author(s):

Version:

  • Release: 0.7.0

Copyright:

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

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 45]
Parses and verifies the file doc comment.

Verifies that :

  • A file doc comment exists.
  • There is no blank line between the open tag and the file comment.
  • Short description ends with a full stop.
  • There is a blank line after the short description.
  • Each paragraph of the long description ends with a full stop.
  • There is a blank line between the description and the tags.
  • Check the order, indentation and content of each tag.
  • There is exactly one blank line after the file comment.



[ Top ]


Class Variables

$commentParser =  null

[line 53]

The header comment parser for the current file.
  • Access: protected

Type:   PHP_CodeSniffer_Comment_Parser_ClassCommentParser


[ Top ]

$currentFile =  null

[line 60]

The current PHP_CodeSniffer_File object we are processing.
  • Access: protected



[ Top ]



Method Detail

process   [line 84]

void process( PHP_CodeSniffer_File $phpcsFile, int $stackPtr)

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

Parameters:

PHP_CodeSniffer_File   $phpcsFile   —  The file being scanned.
int   $stackPtr   —  The position of the current token in the stack passed in $tokens.

[ Top ]

processAuthors   [line 468]

void processAuthors( int $errorPos)

Author tag must be 'Squiz Pty Ltd <mysource4@squiz.net>'.
  • Access: protected

Parameters:

int   $errorPos   —  The line number where the error occurs.

[ Top ]

processCopyright   [line 493]

void processCopyright( int $errorPos)

Copyright tag must be in the form '2006-YYYY Squiz Pty Ltd (ABN 77 084 670 600)'.
  • Access: protected

Parameters:

int   $errorPos   —  The line number where the error occurs.

[ Top ]

processLicense   [line 518]

void processLicense( int $errorPos)

License tag must be 'http://matrix.squiz.net/licence Squiz.Net Open Source Licence'.
  • Access: protected

Parameters:

int   $errorPos   —  The line number where the error occurs.

[ Top ]

processPackage   [line 410]

void processPackage( int $errorPos)

The package name must be 'MySource4'.
  • Access: protected

Parameters:

int   $errorPos   —  The line number where the error occurs.

[ Top ]

processSubpackage   [line 434]

void processSubpackage( int $errorPos)

The subpackage name must be camel-cased.
  • Access: protected

Parameters:

int   $errorPos   —  The line number where the error occurs.

[ Top ]

processTags   [line 252]

void processTags( int $commentStart, int $commentEnd)

Processes each required or optional tag.
  • Access: protected

Parameters:

int   $commentStart   —  The position in the stack where the comment started.
int   $commentEnd   —  The position in the stack where the comment ended.

[ Top ]

processVersion   [line 383]

void processVersion( int $errorPos)

The version tag must have the exact keyword 'release_version'.
  • Access: protected

Parameters:

int   $errorPos   —  The line number where the error occurs.

[ Top ]

register   [line 68]

array register( )

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

[ Top ]


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