Skip to content

Commit ee0f50b

Browse files
committed
Fixed bug #1112 : File docblock not recognized when require_once follows it
1 parent ee0b069 commit ee0f50b

File tree

3 files changed

+2
-4
lines changed

3 files changed

+2
-4
lines changed

CodeSniffer/Standards/PEAR/Sniffs/Commenting/FileCommentSniff.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -172,10 +172,6 @@ public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
172172
T_ABSTRACT,
173173
T_CONST,
174174
T_PROPERTY,
175-
T_INCLUDE,
176-
T_INCLUDE_ONCE,
177-
T_REQUIRE,
178-
T_REQUIRE_ONCE,
179175
);
180176

181177
if (in_array($tokens[$nextToken]['code'], $ignore) === true) {

CodeSniffer/Standards/PEAR/Tests/Commenting/FileCommentUnitTest.inc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ declare(encoding='utf-8');
4040
* @package ''
4141
* @subpackage !!
4242
*/
43+
require_once '/some/path.php';
4344
?>
4445
<?php
4546
/**

package.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ http://pear.php.net/dtd/package-2.0.xsd">
9090
-- Thanks to Jason McCreary for the patch
9191
- Fixed bug #1101 : Incorrect indent errors when breaking out of PHP inside an IF statement
9292
- Fixed bug #1102 : Squiz.Formatting.OperatorBracket.MissingBrackets faulty bracketing fix
93+
- Fixed bug #1112 : File docblock not recognized when require_once follows it
9394
</notes>
9495
<contents>
9596
<dir name="/">

0 commit comments

Comments
 (0)