Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,9 @@ Some content <?
echo '<?';
?> Some more content

// Test snippet clipping with a line that has more than 40 characters after the PHP open tag.
Some content <? echo $var; ?> Some longer content to trigger snippet clipping

// Only recognize closing tag after opener.
// The test below must be the last test in the file because there must be no PHP close tag after it.
Some?> content <?
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// Although not the focus of this test, this is an intentional parse error when short_open_tag is on.
// This should be the only test in this file.
// Test that the sniff bails when short_open_tag is off and there is a token other than
// T_INLINE_HTML after the short open tag and before the close tag.

<?<?php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ protected function getTestFiles($testFileBase)
$testFiles[] = $testFileBase.'2.inc';
} else {
$testFiles[] = $testFileBase.'3.inc';
$testFiles[] = $testFileBase.'4.inc';
}

return $testFiles;
Expand Down Expand Up @@ -97,6 +98,7 @@ public function getWarningList($testFile='')
3 => 1,
6 => 1,
11 => 1,
16 => 1,
];
default:
return [];
Expand Down