-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ignore whitespace between tags in unreachable test
- Loading branch information
Showing
4 changed files
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
src/Standards/Squiz/Tests/PHP/NonExecutableCodeUnitTest.3.inc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<!-- no problem here --> | ||
<?php if (true): ?> | ||
<?php foreach ([] as $item): ?> | ||
<?php continue; ?> | ||
<?php endforeach; ?> | ||
<?php endif; ?> | ||
|
||
<!-- no problem here --> | ||
<?php if (true) { ?> | ||
<?php foreach ([] as $item) { ?> | ||
<?php continue; ?> | ||
<?php } ?> | ||
<?php } ?> | ||
|
||
<!-- should detect an error here --> | ||
<?php if (true): ?> | ||
<?php foreach ([] as $item): ?> | ||
<?php continue; ?> | ||
<div>non-executable</div> | ||
<?php endforeach; ?> | ||
<?php endif; ?> | ||
|
||
<!-- should detect an error here --> | ||
<?php if (true): ?> | ||
<?php foreach ([] as $item): ?> | ||
<?php continue; ?> | ||
|
||
<div>non-executable</div> | ||
|
||
<?php endforeach; ?> | ||
<?php endif; ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters