Skip to content

Commit d28c175

Browse files
author
Ivan Ružević
authored
Merge pull request #34 from infinum/update-standards
Update standards
2 parents 279a271 + 992290d commit d28c175

2 files changed

Lines changed: 46 additions & 0 deletions

File tree

Infinum/ruleset.xml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,22 @@
8888
<!-- Disallow spacing inside arrays. -->
8989
<rule ref="Squiz.Arrays.ArrayBracketSpacing"/>
9090

91+
<!-- Private methods MUST not be prefixed with an underscore -->
92+
<rule ref="Squiz.NamingConventions.ValidFunctionName.PrivateNoUnderscore">
93+
<severity>0</severity>
94+
</rule>
95+
<rule ref="PSR2.Methods.MethodDeclaration.Underscore">
96+
<type>error</type>
97+
</rule>
98+
99+
<!-- Private properties MUST not be prefixed with an underscore -->
100+
<rule ref="Squiz.NamingConventions.ValidVariableName.PrivateNoUnderscore">
101+
<severity>0</severity>
102+
</rule>
103+
<rule ref="PSR2.Classes.PropertyDeclaration.Underscore">
104+
<type>error</type>
105+
</rule>
106+
91107
<!-- Ensure proper object instantiation. -->
92108
<rule ref="WordPress.Classes.ClassInstantiation"/>
93109

tests/code-example-6.php

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?php
2+
3+
/**
4+
* Test
5+
*
6+
* @package Test
7+
*/
8+
9+
namespace A;
10+
11+
/**
12+
* Class
13+
*/
14+
class ClassName
15+
{
16+
/**
17+
* Service array
18+
*
19+
* @var array Services
20+
*/
21+
private $service = [];
22+
23+
/**
24+
* Method name
25+
*/
26+
private function doSomethingPrivate()
27+
{
28+
return '';
29+
}
30+
}

0 commit comments

Comments
 (0)