Skip to content

Commit

Permalink
PEAR FunctionCallSignatureSniff now properly detects indents in more …
Browse files Browse the repository at this point in the history
…mixed HTML/PHP code blocks (ref #645)
  • Loading branch information
gsherwood committed Oct 6, 2015
1 parent 85812a1 commit 3496169
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,11 @@ public function processMultiLineCall(PHP_CodeSniffer_File $phpcsFile, $stackPtr,
} else {
$trimmed = ltrim($tokens[$i]['content']);
if ($trimmed === '') {
$functionIndent = ($tokens[$i]['column'] - 1);
if ($tokens[$i]['code'] === T_INLINE_HTML) {
$functionIndent = strlen($tokens[$i]['content']);
} else {
$functionIndent = ($tokens[$i]['column'] - 1);
}
} else {
$functionIndent = (strlen($tokens[$i]['content']) - strlen($trimmed));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -249,3 +249,13 @@ $this->log(
),
array($e->getData()['object'])
);

?>
<div>
<?php getTemplatePart(
'partials/web-page/carousel-slick/item-slide/header',
[
'class' => $class
]
); ?>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -254,3 +254,13 @@ $this->log(
),
array($e->getData()['object'])
);

?>
<div>
<?php getTemplatePart(
'partials/web-page/carousel-slick/item-slide/header',
[
'class' => $class
]
); ?>
</div>
1 change: 1 addition & 0 deletions package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ http://pear.php.net/dtd/package-2.0.xsd">
</stability>
<license uri="https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt">BSD 3-Clause License</license>
<notes>
- PEAR FunctionCallSignatureSniff now properly detects indents in more mixed HTML/PHP code blocks
- Fixed bug #601 : Expected type hint int[]; found array in Squiz FunctionCommentSniff
-- Thanks to Scato Eggen for the patch
- Fixed bug #625 : Consider working around T_HASHBANG in HHVM 3.5.x and 3.6.x
Expand Down

0 comments on commit 3496169

Please sign in to comment.