-
-
Notifications
You must be signed in to change notification settings - Fork 8
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 #272 from PHPCSStandards/universal/constructordest…
…ructorreturn-allow-for-namespaced-classes CodeAnalysis/ConstructorDestructorReturn: correctly ignore PHP-4-style constructors in namespaced classes
- Loading branch information
Showing
2 changed files
with
26 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
14 changes: 14 additions & 0 deletions
14
Universal/Tests/CodeAnalysis/ConstructorDestructorReturnUnitTest.5.inc
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,14 @@ | ||
<?php | ||
|
||
/* | ||
* The PHP4-style constructors are not constructors in namespaced files. | ||
* No errors should be thrown for it, nor any auto-fixes made. | ||
*/ | ||
namespace Some\Name; | ||
|
||
class ReturnsAValue { | ||
function returnsAValue(): string | ||
{ | ||
return 'php4style'; | ||
} | ||
} |