-
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.
Properties should not be tested for regular constructors (Fixes #142)
Only properties which define a visibility and therefore are promoted constructor properties are required to define a variable docblock.
- Loading branch information
1 parent
9b3b3cd
commit 582195e
Showing
3 changed files
with
47 additions
and
1 deletion.
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
24 changes: 24 additions & 0 deletions
24
.../Sniffs/Commenting/fixtures/VariableComment/constructor_with_mixed_property_promotion.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,24 @@ | ||
<?php | ||
|
||
namespace MoodleHQ\MoodleCS\moodle\Tests\Sniffs\PHPUnit; | ||
|
||
class constructor_with_mixed_property_promotion { | ||
/** | ||
* Constructor | ||
* | ||
* @param string $serverurl a Moodle URL | ||
* @param string $token the token used to do the web service call | ||
* @param string $example | ||
* @param string $example2 | ||
* @param string $example3 | ||
*/ | ||
public function __construct( | ||
$serverurl, | ||
string $token, | ||
/** @var string The example */ | ||
protected string $example, | ||
string $example2, | ||
protected string $example3 | ||
) { | ||
} | ||
} |