-
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.
Merge pull request #118 from stronk7/prevent_check_when_no_commponent
Disable package checks whenever missing a target component
- Loading branch information
Showing
3 changed files
with
74 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
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
47 changes: 47 additions & 0 deletions
47
moodle/Tests/Sniffs/Commenting/fixtures/package_tags_nocheck.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,47 @@ | ||
<?php | ||
|
||
namespace MoodleHQ\MoodleCS\moodle\Tests\Sniffs\PHPUnit; | ||
|
||
defined('MOODLE_INTERNAL') || die(); // Make this always the 1st line in all CS fixtures. | ||
|
||
// Wrong components are not reported because the expected component is needed and we don't know it | ||
|
||
/** | ||
* @package wrong_package | ||
*/ | ||
class package_wrong_in_class { | ||
} | ||
|
||
/** | ||
* @package wrong_package | ||
*/ | ||
interface package_wrong_in_interface { | ||
} | ||
|
||
/** | ||
* @package wrong_package | ||
*/ | ||
interface package_wrong_in_trait { | ||
} | ||
|
||
/** | ||
* @package wrong_package | ||
*/ | ||
function package_wrong_in_function(): void { | ||
} | ||
|
||
// All these (missing) continue being reported because the expected component is not needed. | ||
|
||
class missing_docblock_in_class { | ||
} | ||
|
||
interface missing_docblock_in_interface { | ||
} | ||
|
||
trait missing_docblock_in_trait { | ||
} | ||
|
||
function missing_docblock_in_function(): void { | ||
return; | ||
} | ||
|