PHP 8.2.31
Preview: DisallowSpaceIndentUnitTest.2.inc.fixed Size: 2.20 KB
//opt/cpanel/ea-wappspector/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/WhiteSpace/DisallowSpaceIndentUnitTest.2.inc.fixed

<?php

class ExampleClass
{
	function exampleFunction() {}

}

	$o = <<<EOF
    this is some text
    this is some text
EOF;

	$correctVar = false;
	$correctVar = true;

// Indent with spaces is not allowed
 $hello = array();
   $world = '';
// here the indention is mixed with tabs and spaces
// [tab][space][space][space][tab]return "<$name$xmlns$type_str $atts xsi:nil=\"true\"/>";
		return "<$name$xmlns$type_str $atts xsi:nil=\"true\"/>";
// [space][space][space][tab]return "<$name$xmlns$type_str $atts xsi:nil=\"true\"/>";
	return "<$name$xmlns$type_str $atts xsi:nil=\"true\"/>";
// Doc comments are indent with tabs and one space
//[tab]/**
//[tab][space]*
	/**
	 * CVS revision for HTTP headers.
	 *
	  * @var string
	 * @access private
	 */
	/**
	 *
	*/

$str = 'hello
        there';

/**
 * This PHP DocBlock should be fine, even though there is a single space at the beginning.
 *
 * @var int $x
 */
$x = 1;

?>
<html>
	<head>
		<title>Foo</title>
	</head>
	<body>
		<div>
			<div>
				<div>
				</div>
			</div>
		</div>
	</body>
</html>

<?php

			// Issue #1404
			// This is a line with mixed tabs and spaces.
			echo 'And here is another line with mixed tabs and spaces.';
			echo 'And another one.';
			echo 'And another one.';
			echo 'And another one.';

// Spaces after comment.
	
$x = 1;

// Mixed tabs and spaces after comment.
		
$x = 1;

// Mixed spaces and tabs after comment.
			   
$x = 1;

/*
 * This multi-line comment should be fine and should be ignored for metrics.
 */

/*
 This multi-line comment should be fine and should be ignored for metrics.

 Another line.
 */

	/**
	 * This PHP DocBlock is indented with tabs + one space; metrics should say tabs.
	 *
	 * @var int $x
	 */

	/*
	 * This multi-line comment is indented with tabs + one space; metrics should say tabs.
	 */

	/**
	 * This PHP DocBlock is indented with spaces and should be fixed.
	 *
	 * @var int $x
	 */

	/*
	 * This multi-line comment is indented with spaces and should be fixed.
	 */

	/*
	 This multi-line comment is indented with spaces and should be fixed.

	 Another line.
	 */

// A `yield from` can be multiline and may contain spaces in the indentation whitespace between the keywords.
function myGenerator() {
	yield
	from
	gen2();
}

Directory Contents

Dirs: 0 × Files: 52

Name Size Perms Modified Actions
4.52 KB lrw-r--r-- 2025-11-04 16:30:35
Edit Download
4.44 KB lrw-r--r-- 2025-11-04 16:30:35
Edit Download
122 B lrw-r--r-- 2025-11-04 16:30:35
Edit Download
2.74 KB lrw-r--r-- 2025-11-04 16:30:35
Edit Download
2.32 KB lrw-r--r-- 2025-11-04 16:30:35
Edit Download
2.20 KB lrw-r--r-- 2025-11-04 16:30:35
Edit Download
2.32 KB lrw-r--r-- 2025-11-04 16:30:35
Edit Download
2.20 KB lrw-r--r-- 2025-11-04 16:30:35
Edit Download
202 B lrw-r--r-- 2025-11-04 16:30:35
Edit Download
175 B lrw-r--r-- 2025-11-04 16:30:35
Edit Download
125 B lrw-r--r-- 2025-11-04 16:30:35
Edit Download
61 B lrw-r--r-- 2025-11-04 16:30:35
Edit Download
58 B lrw-r--r-- 2025-11-04 16:30:35
Edit Download
72 B lrw-r--r-- 2025-11-04 16:30:35
Edit Download
69 B lrw-r--r-- 2025-11-04 16:30:35
Edit Download
3.72 KB lrw-r--r-- 2025-11-04 16:30:35
Edit Download
1.70 KB lrw-r--r-- 2025-11-04 16:30:35
Edit Download
1.86 KB lrw-r--r-- 2025-11-04 16:30:35
Edit Download
202 B lrw-r--r-- 2025-11-04 16:30:35
Edit Download
253 B lrw-r--r-- 2025-11-04 16:30:35
Edit Download
83 B lrw-r--r-- 2025-11-04 16:30:35
Edit Download
62 B lrw-r--r-- 2025-11-04 16:30:35
Edit Download
68 B lrw-r--r-- 2025-11-04 16:30:35
Edit Download
74 B lrw-r--r-- 2025-11-04 16:30:35
Edit Download
79 B lrw-r--r-- 2025-11-04 16:30:35
Edit Download
3.84 KB lrw-r--r-- 2025-11-04 16:30:35
Edit Download
233 B lrw-r--r-- 2025-11-04 16:30:35
Edit Download
215 B lrw-r--r-- 2025-11-04 16:30:35
Edit Download
1.46 KB lrw-r--r-- 2025-11-04 16:30:35
Edit Download
548 B lrw-r--r-- 2025-11-04 16:30:35
Edit Download
523 B lrw-r--r-- 2025-11-04 16:30:35
Edit Download
141 B lrw-r--r-- 2025-11-04 16:30:35
Edit Download
127 B lrw-r--r-- 2025-11-04 16:30:35
Edit Download
2.17 KB lrw-r--r-- 2025-11-04 16:30:35
Edit Download
1.81 KB lrw-r--r-- 2025-11-04 16:30:35
Edit Download
1.75 KB lrw-r--r-- 2025-11-04 16:30:35
Edit Download
98 B lrw-r--r-- 2025-11-04 16:30:35
Edit Download
2.61 KB lrw-r--r-- 2025-11-04 16:30:35
Edit Download
26.40 KB lrw-r--r-- 2025-11-04 16:30:35
Edit Download
26.52 KB lrw-r--r-- 2025-11-04 16:30:35
Edit Download
3.84 KB lrw-r--r-- 2025-11-04 16:30:35
Edit Download
3.88 KB lrw-r--r-- 2025-11-04 16:30:35
Edit Download
19.64 KB lrw-r--r-- 2025-11-04 16:30:35
Edit Download
19.62 KB lrw-r--r-- 2025-11-04 16:30:35
Edit Download
563 B lrw-r--r-- 2025-11-04 16:30:35
Edit Download
556 B lrw-r--r-- 2025-11-04 16:30:35
Edit Download
27 B lrw-r--r-- 2025-11-04 16:30:35
Edit Download
5.32 KB lrw-r--r-- 2025-11-04 16:30:35
Edit Download
1.45 KB lrw-r--r-- 2025-11-04 16:30:35
Edit Download
1.42 KB lrw-r--r-- 2025-11-04 16:30:35
Edit Download
109 B lrw-r--r-- 2025-11-04 16:30:35
Edit Download
1.87 KB lrw-r--r-- 2025-11-04 16:30:35
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).