Class: Squiz_Sniffs_Commenting_FileCommentSniff
Source Location: /PHP_CodeSniffer-1.3.0/CodeSniffer/Standards/Squiz/Sniffs/Commenting/FileCommentSniff.php
Parses and verifies the file doc comment.
Author(s):
Version:
Copyright:
- 2006 Squiz Pty Ltd (ABN 77 084 670 600)
Inherited Variables
Inherited Methods
Class Details
[line 46]
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.
Class Variables
$commentParser = null
[line 64]
The header comment parser for the current file.
Type:
PHP_CodeSniffer_Comment_Parser_ClassCommentParser
$currentFile = null
[line 71]
The current PHP_CodeSniffer_File object we are processing.
$supportedTokenizers = array(
'PHP',
'JS',
)
[line 54]
A list of tokenizers this sniff supports.
Method Detail
getIndentation [line 417]
Get the indentation information of each tag.
Parameters:
string
$tagName
—
The name of the doc comment element.
process [line 95]
Processes this test, when one of its tokens is encountered.
Parameters:
int
$stackPtr
—
The position of the current token in the stack passed in $tokens.
processAuthors [line 513]
void processAuthors(
int
$errorPos)
Author tag must be 'Squiz Pty Ltd <mysource4@squiz.net>'.
Parameters:
int
$errorPos
—
The line number where the error occurs.
processCopyrights [line 538]
void processCopyrights(
int
$errorPos)
Copyright tag must be in the form '2006-YYYY Squiz Pty Ltd (ABN 77 084 670 600)'.
Parameters:
int
$errorPos
—
The line number where the error occurs.
processLicense [line 565]
void processLicense(
int
$errorPos)
License tag must be 'http://matrix.squiz.net/licence Squiz.Net Open Source Licence'.
Parameters:
int
$errorPos
—
The line number where the error occurs.
processPackage [line 441]
void processPackage(
int
$errorPos)
The package name must be camel-cased.
Parameters:
int
$errorPos
—
The line number where the error occurs.
processSubpackage [line 477]
void processSubpackage(
int
$errorPos)
The subpackage name must be camel-cased.
Parameters:
int
$errorPos
—
The line number where the error occurs.
processTags [line 301]
void processTags(
int
$commentStart, int
$commentEnd)
Processes each required or optional tag.
Parameters:
int
$commentStart
—
The position in the stack where the comment started.
int
$commentEnd
—
The position in the stack where the comment ended.
register [line 79]
Returns an array of tokens this test wants to listen for.
Documentation generated on 2019年3月11日 15:43:14 -0400 by
phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.