-
Notifications
You must be signed in to change notification settings - Fork 72
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 #170 from kabalin/openingclassbrace
Use Generic.Classes.OpeningBraceSameLine sniff
- Loading branch information
Showing
4 changed files
with
58 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
31 changes: 31 additions & 0 deletions
31
moodle/tests/fixtures/generic_classes_openingclassbrace.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,31 @@ | ||
<?php | ||
defined('MOODLE_INTERNAL') || die(); // Make this always the 1st line in all CS fixtures. | ||
|
||
// ONE space before curly bracket is mandatory. | ||
class test01{ | ||
} | ||
|
||
class test02 extends test01{ | ||
} | ||
|
||
class test03 { | ||
} | ||
|
||
class test04 extends test01 { | ||
} | ||
|
||
// New line curly bracket is a viloation | ||
class test05 | ||
{ | ||
} | ||
|
||
// These are correct. | ||
class test06 { | ||
} | ||
|
||
class test07 {} | ||
|
||
class test08 extends test06 { | ||
} | ||
|
||
class test09 extends test06 {} |
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