-
Notifications
You must be signed in to change notification settings - Fork 14
/
phpcs.xml
62 lines (53 loc) · 3.25 KB
/
phpcs.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<?xml version="1.0"?>
<ruleset name="googleAnalyticsImporter" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="vendor/squizlabs/php_codesniffer/phpcs.xsd">
<description>Matomo Coding Standard for GoogleAnalyticsImporter plugin</description>
<arg name="extensions" value="php" />
<file>.</file>
<exclude-pattern>tests/javascript/*</exclude-pattern>
<exclude-pattern>*/vendor/*</exclude-pattern>
<!-- Do nothing for GA3 code, as that code is not applicable anymore -->
<exclude-pattern>Commands/GenerateGaTestData.php</exclude-pattern>
<exclude-pattern>Commands/ImportReports.php</exclude-pattern>
<exclude-pattern>Importers/Referrers/RecordImporter.php</exclude-pattern>
<exclude-pattern>Importers/MarketingCampaignsReporting/RecordImporter.php</exclude-pattern>
<exclude-pattern>Importers/Resolution/RecordImporter.php</exclude-pattern>
<exclude-pattern>Importers/Events/RecordImporter.php</exclude-pattern>
<exclude-pattern>Importers/CustomDimensions/RecordImporter.php</exclude-pattern>
<exclude-pattern>Importers/UserLanguage/RecordImporter.php</exclude-pattern>
<exclude-pattern>Importers/Actions/RecordImporter.php</exclude-pattern>
<exclude-pattern>Importers/DevicesDetection/RecordImporter.php</exclude-pattern>
<exclude-pattern>Importers/UserCountry/RecordImporter.php</exclude-pattern>
<exclude-pattern>Importers/VisitFrequency/RecordImporter.php</exclude-pattern>
<exclude-pattern>Importers/Goals/RecordImporter.php</exclude-pattern>
<exclude-pattern>Importers/CustomVariables/RecordImporter.php</exclude-pattern>
<exclude-pattern>Importers/VisitorInterest/RecordImporter.php</exclude-pattern>
<exclude-pattern>Importers/VisitsSummary/RecordImporter.php</exclude-pattern>
<exclude-pattern>Importer.php</exclude-pattern>
<exclude-pattern>test.php</exclude-pattern>
<exclude-pattern>RecordImporter.php</exclude-pattern>
<exclude-pattern>Google/GoogleMetricMapper.php</exclude-pattern>
<exclude-pattern>Google/GoogleCustomDimensionMapper.php</exclude-pattern>
<exclude-pattern>Google/GoogleGoalMapper.php</exclude-pattern>
<exclude-pattern>Google/GoogleAnalyticsQueryService.php</exclude-pattern>
<exclude-pattern>Google/GoogleResponseDataTableFactory.php</exclude-pattern>
<rule ref="Matomo"></rule>
<rule ref="Generic.Files.LineLength">
<properties>
<property name="lineLimit" value="250" />
</properties>
<exclude-pattern>tests/*</exclude-pattern>
</rule>
<rule ref="Squiz.Classes.ValidClassName.NotCamelCaps">
<!-- Classnames for our update files don't match PascalCase, this can't be changed easily -->
<exclude-pattern>Updates/*</exclude-pattern>
</rule>
<rule ref="PSR1.Methods.CamelCapsMethodName.NotCamelCaps">
<!-- Allow using method name without camel caps in tests as long as some methods are named test_* -->
<exclude-pattern>tests/*</exclude-pattern>
</rule>
<rule ref="PSR1.Classes.ClassDeclaration.MultipleClasses">
<!-- Allow using multiple classes in one file for tests -->
<exclude-pattern>tests/*</exclude-pattern>
<exclude-pattern>Monolog/Handler/GASystemLogHandler.php</exclude-pattern>
</rule>
</ruleset>