PHP Classes

File: vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/ControlStructures/ControlStructureSpacingUnitTest.inc.fixed

Recommend this page to a friend!
  Classes of Adeleye Ayodeji   Download Installed Plugin   vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/ControlStructures/ControlStructureSpacingUnitTest.inc.fixed   Download  
File: vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/ControlStructures/ControlStructureSpacingUnitTest.inc.fixed
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Download Installed Plugin
Download a WordPress plugin as a ZIP archive
Author: By
Last change:
Date: 2 days ago
Size: 1,526 bytes
 

Contents

Class file image Download
<?php while ($expr) { } if ( ) { } while ( $expr1 && $expr2 ) { } while ( $expr1 && $expr2 ) { } do { } while ( $expr1 && $expr2 ) { } if ( $expr1 && $expr2 && $expr3 ) { while ( $expr1 && $expr2 ) { } while ( $expr1 && $expr2 ) { } } while ( $expr1 && $expr2 ) { } while ( $expr1 && $expr2 // comment here ) { } for ( $i = 0; $i < 10; $i++; ) { } if ( foo( 'this is a string', <<<EOD foobar! EOD ) ) { return; } if ( isset($foo) === true && $bar > $foo /* * A multi-line comment. */ && $foo === true ) { break; } match ( $expr1 && $expr2 && $expr3 ) { // structure body }; match ( $expr1 && $expr2 && $expr3 ) { // structure body }; // Ensure the sniff handles too many newlines (not just too few). for ( $i = 0; $i < 10; $i++ ) {} // Ensure the sniff does not remove indentation whitespace when comments are involved. for ( // comment. $i = 0; $i < 10; $i++ ) {} // The sniff treats a comment (ie non-whitespace) as content, but only at the // start / end of the control structure. So the inner-whitespace here is // intentionally ignored by this sniff. Additionally, the comment is not indented // by this sniff when fixing. for ( // comment. $i = 0; $i < 10; $i++ ) {}