children as $child) { // There should be no error after this // foreach, because it is followed by a // close PHP tag. } ?>
children as $child) { echo $child; } if ($defaultPageDesign === 0 && $defaultCascade === TRUE && $defaultChildDesign === 0 ) { $settingsUpdated = FALSE; } foreach ($blah as $var) { if ($blah) { } } if ($defaultPageDesign === 0 && $defaultCascade === TRUE && $defaultChildDesign === 0 ) { $settingsUpdated = FALSE; } $moo = 'blar'; switch ($moo) { case 'blar': if ($moo === 'blar2') { $moo = 'blar' } return $moo; default: $moo = 'moo'; break; } do { } while (true); try { // Something } catch (Exception $e) { // Something } try { // Something } catch (Exception $e) { // Something } if ($one) { } elseif ($two) { } // else if something else if ($three) { } // else do something else { } if ($one) { } do { echo 'hi'; } while ($blah); if ($one) { } // No blank line here. if ($two) { } switch ($moo) { case 'blar': if ($moo === 'blar2') { $moo = 'blar' } return $moo; } try { // Something } catch (Exception $e) { // Something } finally { // Something } if ($foo) { /** * Comment */ function foo() { // Code here } /** * Comment */ class bar() { }//end class } if (true) { // some comment goes here echo 'foo'; } if (true) { echo 'foo'; echo 'foo'; } if ($true) { echo 'hi 2'; }//end if echo 'hi'; if ($true) { echo 'hi 2'; } // phpcs:enable Standard.Category.Sniff -- for reasons. echo 'hi'; ?>