-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test for multiline attributes for MissingDocblockSniff
Signed-off-by: Daniel Ziegenberg <[email protected]>
- Loading branch information
1 parent
3bfeb70
commit 74421e1
Showing
2 changed files
with
56 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
50 changes: 50 additions & 0 deletions
50
...e/Tests/Sniffs/Commenting/fixtures/MissingDocblock/docblock_with_multiline_attributes.php
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,50 @@ | ||
<?php | ||
|
||
/** | ||
* This file contains multiple testcases for multi line attributes. | ||
*/ | ||
|
||
namespace MoodleHQ\MoodleCS\moodle\Tests\Sniffs\PHPUnit; | ||
|
||
defined('MOODLE_INTERNAL') || die(); // Make this always the 1st line in all CS fixtures. | ||
|
||
/** | ||
* Example class. | ||
*/ | ||
#[\Attribute( | ||
attr1: 'asdf', | ||
attr2: 'asdf', | ||
)] | ||
class class_multiline_attribute { | ||
|
||
/** | ||
* Method attribute. | ||
*/ | ||
#[\Attribute( | ||
attr1: 'asdf', | ||
attr2: 'asdf', | ||
)] | ||
function method_multiline_attribute(): void { | ||
} | ||
} | ||
|
||
/** | ||
* Interface with multiline attributes. | ||
*/ | ||
#[\Attribute( | ||
attr1: 'asdf', | ||
attr2: 'asdf', | ||
)] | ||
interface interface_multiline_attribute { | ||
} | ||
|
||
/** | ||
* Trait with multiline attributes. | ||
*/ | ||
|
||
#[\Attribute( | ||
attr1: 'asdf', | ||
attr2: 'asdf', | ||
)] | ||
trait trait_multiline_attribute { | ||
} |