Skip to content

Commit 2288e59

Browse files
authored
update phpcs file
update phpcs file
2 parents 6df4dba + 77ff59b commit 2288e59

1 file changed

Lines changed: 55 additions & 17 deletions

File tree

phpcs.xml

Lines changed: 55 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,31 @@
1-
<?xml version="1.0" encoding="UTF-8"?>
2-
<ruleset name="pcsg-generated-ruleset">
3-
<description>Created with the PHP Coding Standard Generator. http://edorian.github.com/php-coding-standard-generator/
4-
</description>
1+
<?xml version="1.0"?>
2+
<ruleset name="PHP_CodeSniffer">
3+
<description>The coding standard for our project.</description>
4+
<rule ref="PSR2">
5+
<exclude name="Generic.Files.LineLength"/>
6+
<exclude name="Generic.Files.LineEndings"/>
7+
</rule>
8+
9+
<file>app</file>
10+
<file>config</file>
11+
<file>lang</file>
12+
<file>routes</file>
13+
14+
<exclude-pattern>*.json</exclude-pattern>
15+
<exclude-pattern>bootstrap/cache/*</exclude-pattern>
16+
<exclude-pattern>bootstrap/*</exclude-pattern>
17+
<exclude-pattern>config/debugbar.php</exclude-pattern>
18+
<exclude-pattern>*/migrations/*</exclude-pattern>
19+
<exclude-pattern>*/seeds/*</exclude-pattern>
20+
<exclude-pattern>*.blade.php</exclude-pattern>
21+
<exclude-pattern>*.js</exclude-pattern>
22+
<exclude-pattern>app/Console/Kernel.php</exclude-pattern>
23+
<exclude-pattern>app/Exceptions/Handler.php</exclude-pattern>
24+
<exclude-pattern>app/Models/Relationships/NotificationRelationship.php</exclude-pattern>
25+
<exclude-pattern>app/Models/Relationships/PatientRelationship.php</exclude-pattern>
26+
<exclude-pattern>app/Models/Relationships/UserRelationship.php</exclude-pattern>
27+
<exclude-pattern>app/Http/Middleware/(Authenticate.php|CheckForMaintenanceMode.php|VerifyCsrfToken.php|RedirectIfAuthenticated.php|TrustProxies.php)</exclude-pattern>
28+
529
<rule ref="Generic.Classes.DuplicateClassName"/>
630
<rule ref="Generic.CodeAnalysis.EmptyStatement"/>
731
<rule ref="Generic.CodeAnalysis.ForLoopShouldBeWhileLoop"/>
@@ -13,7 +37,6 @@
1337
<rule ref="Generic.Commenting.Fixme"/>
1438
<rule ref="Generic.ControlStructures.InlineControlStructure"/>
1539
<rule ref="Generic.Files.ByteOrderMark"/>
16-
<rule ref="Generic.Files.LineEndings"/>
1740
<rule ref="Generic.Files.OneClassPerFile"/>
1841
<rule ref="Generic.Formatting.DisallowMultipleStatements"/>
1942
<rule ref="Generic.Functions.CallTimePassByReference"/>
@@ -27,17 +50,8 @@
2750
<rule ref="Generic.PHP.NoSilencedErrors"/>
2851
<rule ref="Generic.WhiteSpace.DisallowTabIndent"/>
2952
<rule ref="Generic.WhiteSpace.ScopeIndent"/>
30-
<rule ref="MySource.PHP.EvalObjectFactory"/>
31-
<rule ref="PSR1.Classes.ClassDeclaration"/>
32-
<rule ref="PSR1.Files.SideEffects"/>
33-
<rule ref="PSR2.Classes.ClassDeclaration"/>
34-
<rule ref="PSR2.Classes.PropertyDeclaration"/>
35-
<rule ref="PSR2.ControlStructures.ControlStructureSpacing"/>
36-
<rule ref="PSR2.ControlStructures.ElseIfDeclaration"/>
37-
<rule ref="PSR2.ControlStructures.SwitchDeclaration"/>
38-
<rule ref="PSR2.Methods.MethodDeclaration"/>
39-
<rule ref="PSR2.Namespaces.NamespaceDeclaration"/>
40-
<rule ref="PSR2.Namespaces.UseDeclaration"/>
53+
<rule ref="Generic.Commenting.Fixme"/>
54+
<rule ref="Generic.Commenting.Todo"/>
4155
<rule ref="Squiz.PHP.DiscouragedFunctions"/>
4256
<rule ref="Squiz.PHP.EmbeddedPhp"/>
4357
<rule ref="Squiz.PHP.Eval"/>
@@ -48,5 +62,29 @@
4862
<rule ref="Squiz.PHP.NonExecutableCode"/>
4963
<rule ref="Squiz.Scope.StaticThisUsage"/>
5064
<rule ref="Squiz.WhiteSpace.ScopeKeywordSpacing"/>
65+
<rule ref="Squiz.Commenting.DocCommentAlignment"/>
66+
<rule ref="Squiz.Commenting.LongConditionClosingComment"/>
67+
<rule ref="Squiz.Commenting.PostStatementComment"/>
68+
<rule ref="Squiz.NamingConventions.ValidVariableName.PrivateNoUnderscore">
69+
<severity>0</severity>
70+
</rule>
5171
<rule ref="Zend.Files.ClosingTag"/>
52-
</ruleset>
72+
73+
<!-- Ban some functions -->
74+
<rule ref="Generic.PHP.ForbiddenFunctions">
75+
<properties>
76+
<property name="forbiddenFunctions" type="array">
77+
<element key="sizeof" value="count"/>
78+
<element key="delete" value="unset"/>
79+
<element key="print" value="echo"/>
80+
<element key="create_function" value="null"/>
81+
<element key="dd" value="null"/>
82+
</property>
83+
</properties>
84+
</rule>
85+
86+
<!-- Show progression -->
87+
<arg name="colors"/>
88+
<arg value="p"/>
89+
<ini name="memory_limit" value="512M"/>
90+
</ruleset>

0 commit comments

Comments
 (0)