opt
/
cpanel
/
ea-wappspector
/
vendor
/
squizlabs
/
php_codesniffer
/
src
/
Standards
/
Squiz
/
Tests
/
Commenting
➕ New
📤 Upload
✎ Editing:
ClosingDeclarationCommentUnitTest.1.inc.fixed
← Back
<?php function __construct() { }//end __construct() function myFunction() { }//end myFunction() function ourFunction() { }//end ourFunction() function yourFunction() { }//end yourFunction() class TestClass { function __construct() { }//end __construct() function myFunction() { }//end myFunction() function yourFunction() { }//end yourFunction() }//end class abstract class TestClass { abstract function myFunction(); function ourFunction() { }//end ourFunction() function yourFunction() { }//end yourFunction() }//end class interface TestClass { function myFunction(); function ourFunction(); function yourFunction(); }//end interface class TestClass { }//end class abstract class TestClass { }//end class interface TestClass { }//end interface class MyClass { public function myFunction(); }//end class // Closures don't need end comments. echo preg_replace_callback('~-([a-z])~', function ($match) { return strtoupper($match[1]); }, 'hello-world'); class TestClass { }//end class enum MissingClosingComment { }//end enum enum HasClosingComment { }//end enum function misplacedClosingCommentWhitespace() { }//end misplacedClosingCommentWhitespace() function misplacedClosingCommentMultipleNewlines() { }//end misplacedClosingCommentMultipleNewlines() function missingClosingComment() { }//end missingClosingComment() function commentHasMoreIndentationThanFunction() { }//end commentHasMoreIndentationThanFunction() class Foo { function commentHasLessIndentationThanFunction() { }//end commentHasLessIndentationThanFunction() function misplacedClosingCommentWithIndentation() { }//end misplacedClosingCommentWithIndentation() }//end class // Anonymous classes don't need end comments. $anon = new class {}; // Arrow functions don't need end comments. $arrow = fn($a) => $a; trait TestTrait { }//end trait trait TestTrait { }//end trait
💾 Save Changes
Cancel
📤 Upload File
×
Select File
Upload
Cancel
➕ Create New
×
Type
📄 File
📁 Folder
Name
Create
Cancel
✎ Rename Item
×
Current Name
New Name
Rename
Cancel
🔐 Change Permissions
×
Target File
Permission (e.g., 0755, 0644)
0755
0644
0777
Apply
Cancel