Skip to content

Commit f1a41c3

Browse files
committed
fixed issue introduced by phpcs, and removed phpcs
1 parent 3946efd commit f1a41c3

File tree

5 files changed

+93
-98
lines changed

5 files changed

+93
-98
lines changed

Makefile

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@ include artifacts/Makefile
66
test:
77
./vendor/bin/phpunit -c phpunit.xml.dist
88

9-
# Codesniffer check
10-
phpcs:
11-
./tooling/vendor/bin/php-cs-fixer check src
12-
139
# Compatibility check
1410
compatibility:
1511
(docker run --rm -v `pwd`:/www --workdir=/www php:5.6-cli find src -iname "*.php" -exec php -l {} \; |grep -v "Php7NodeTraverser.php" | grep -v "No syntax errors detected") && echo OK

src/Hal/Application/Config/Validator.php

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -99,48 +99,48 @@ public function validate(Config $config)
9999
public function help()
100100
{
101101
return <<<EOT
102-
Usage:
102+
Usage:
103103
104-
phpmetrics [...options...] <directories>
104+
phpmetrics [...options...] <directories>
105105
106-
Required:
106+
Required:
107107
108-
<directories> List of directories to parse, separated by a comma (,)
108+
<directories> List of directories to parse, separated by a comma (,)
109109
110-
Optional:
110+
Optional:
111111
112-
--config=<file> Use a file for configuration. File can be a JSON, YAML or INI file.
113-
--exclude=<directory> List of directories to exclude, separated by a comma (,)
114-
--extensions=<php,inc> List of extensions to parse, separated by a comma (,)
115-
--metrics Display list of available metrics
116-
--report-html=<directory> Folder where report HTML will be generated
117-
--report-csv=<file> File where report CSV will be generated
118-
--report-json=<file> File where report Json will be generated
119-
--report-summary-json=<file> File where the summary report Json will be generated
120-
--report-violations=<file> File where XML violations report will be generated
121-
--git[=</path/to/git_binary>] Perform analyses based on Git History (default binary path: "git")
122-
--junit[=</path/to/junit.xml>] Evaluates metrics according to JUnit logs
123-
--quiet Quiet mode
124-
--version Display current version
112+
--config=<file> Use a file for configuration. File can be a JSON, YAML or INI file.
113+
--exclude=<directory> List of directories to exclude, separated by a comma (,)
114+
--extensions=<php,inc> List of extensions to parse, separated by a comma (,)
115+
--metrics Display list of available metrics
116+
--report-html=<directory> Folder where report HTML will be generated
117+
--report-csv=<file> File where report CSV will be generated
118+
--report-json=<file> File where report Json will be generated
119+
--report-summary-json=<file> File where the summary report Json will be generated
120+
--report-violations=<file> File where XML violations report will be generated
121+
--git[=</path/to/git_binary>] Perform analyses based on Git History (default binary path: "git")
122+
--junit[=</path/to/junit.xml>] Evaluates metrics according to JUnit logs
123+
--quiet Quiet mode
124+
--version Display current version
125125
126-
Examples:
126+
Examples:
127127
128-
phpmetrics --report-html="./report" ./src
128+
phpmetrics --report-html="./report" ./src
129129
130-
Analyze the "./src" directory and generate a HTML report on the "./report" folder
130+
Analyze the "./src" directory and generate a HTML report on the "./report" folder
131131
132132
133-
phpmetrics --report-violations="./build/violations.xml" ./src,./lib
133+
phpmetrics --report-violations="./build/violations.xml" ./src,./lib
134134
135-
Analyze the "./src" and "./lib" directories, and generate the "./build/violations.xml" file. This file could
136-
be read by any Continuous Integration Platform, and follows the "PMD Violation" standards.
135+
Analyze the "./src" and "./lib" directories, and generate the "./build/violations.xml" file. This file could
136+
be read by any Continuous Integration Platform, and follows the "PMD Violation" standards.
137137
EOT;
138138
}
139139

140140
public function metrics()
141141
{
142142
$help = <<<EOT
143-
Main metrics are:
143+
Main metrics are:
144144
EOT;
145145

146146
$registry = new Registry();

src/Hal/Component/Issue/Issuer.php

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -72,41 +72,41 @@ public function onError($errno, $errstr, $errfile, $errline)
7272

7373
$message = <<<EOT
7474
75-
<error>We're sorry : an unexpected error occured.</error>
75+
<error>We're sorry : an unexpected error occured.</error>
7676
77-
<question>Can you help us ?</question> Please open a new issue at https://github.com/phpmetrics/PhpMetrics/issues/new, and copy-paste the content
78-
of this file: $logfile ?
77+
<question>Can you help us ?</question> Please open a new issue at https://github.com/phpmetrics/PhpMetrics/issues/new, and copy-paste the content
78+
of this file: $logfile ?
7979
80-
Thanks for your help :)
80+
Thanks for your help :)
8181
EOT;
8282

83-
$log = <<<EOT
84-
## Title: $errstr
83+
$log = <<<EOT
84+
## Title: $errstr
8585
86-
## Message:
86+
## Message:
8787
88-
Hi,
88+
Hi,
8989
90-
This issue occured:
90+
This issue occured:
9191
92-
$errstr
92+
$errstr
9393
94-
**Environment**
94+
**Environment**
9595
96-
+ PHP: $php
97-
+ PhpMetrics: $phpmetrics
98-
+ Operating System: $os
99-
+ File: $errfile (line $errline)
96+
+ PHP: $php
97+
+ PhpMetrics: $phpmetrics
98+
+ Operating System: $os
99+
+ File: $errfile (line $errline)
100100
101-
<details>
102-
<summary>Details</summary>
103-
```
104-
$trace
101+
<details>
102+
<summary>Details</summary>
103+
```
104+
$trace
105105
106106
107-
$debug
108-
```
109-
</details>
107+
$debug
108+
```
109+
</details>
110110
EOT;
111111

112112
$this->output->write($message);

src/Hal/Report/Cli/SummaryWriter.php

Lines changed: 45 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -9,50 +9,50 @@ class SummaryWriter extends SummaryProvider
99
public function getReport()
1010
{
1111
$out = <<<EOT
12-
LOC
13-
Lines of code {$this->sum->loc}
14-
Logical lines of code {$this->sum->lloc}
15-
Comment lines of code {$this->sum->cloc}
16-
Average volume {$this->avg->volume}
17-
Average comment weight {$this->avg->commentWeight}
18-
Average intelligent content {$this->avg->commentWeight}
19-
Logical lines of code by class {$this->locByClass}
20-
Logical lines of code by method {$this->locByMethod}
21-
Object oriented programming
22-
Classes {$this->sum->nbClasses}
23-
Interface {$this->sum->nbInterfaces}
24-
Methods {$this->sum->nbMethods}
25-
Methods by class {$this->methodsByClass}
26-
Lack of cohesion of methods {$this->avg->lcom}
12+
LOC
13+
Lines of code {$this->sum->loc}
14+
Logical lines of code {$this->sum->lloc}
15+
Comment lines of code {$this->sum->cloc}
16+
Average volume {$this->avg->volume}
17+
Average comment weight {$this->avg->commentWeight}
18+
Average intelligent content {$this->avg->commentWeight}
19+
Logical lines of code by class {$this->locByClass}
20+
Logical lines of code by method {$this->locByMethod}
21+
Object oriented programming
22+
Classes {$this->sum->nbClasses}
23+
Interface {$this->sum->nbInterfaces}
24+
Methods {$this->sum->nbMethods}
25+
Methods by class {$this->methodsByClass}
26+
Lack of cohesion of methods {$this->avg->lcom}
2727
28-
Coupling
29-
Average afferent coupling {$this->avg->afferentCoupling}
30-
Average efferent coupling {$this->avg->efferentCoupling}
31-
Average instability {$this->avg->instability}
32-
Depth of Inheritance Tree {$this->treeInheritenceDepth}
28+
Coupling
29+
Average afferent coupling {$this->avg->afferentCoupling}
30+
Average efferent coupling {$this->avg->efferentCoupling}
31+
Average instability {$this->avg->instability}
32+
Depth of Inheritance Tree {$this->treeInheritenceDepth}
3333
34-
Package
35-
Packages {$this->sum->nbPackages}
36-
Average classes per package {$this->avg->classesPerPackage}
37-
Average distance {$this->avg->distance}
38-
Average incoming class dependencies {$this->avg->incomingCDep}
39-
Average outgoing class dependencies {$this->avg->outgoingCDep}
40-
Average incoming package dependencies {$this->avg->incomingPDep}
41-
Average outgoing package dependencies {$this->avg->outgoingPDep}
42-
Complexity
43-
Average Cyclomatic complexity by class {$this->avg->ccn}
44-
Average Weighted method count by class {$this->avg->wmc}
45-
Average Relative system complexity {$this->avg->relativeSystemComplexity}
46-
Average Difficulty {$this->avg->difficulty}
34+
Package
35+
Packages {$this->sum->nbPackages}
36+
Average classes per package {$this->avg->classesPerPackage}
37+
Average distance {$this->avg->distance}
38+
Average incoming class dependencies {$this->avg->incomingCDep}
39+
Average outgoing class dependencies {$this->avg->outgoingCDep}
40+
Average incoming package dependencies {$this->avg->incomingPDep}
41+
Average outgoing package dependencies {$this->avg->outgoingPDep}
42+
Complexity
43+
Average Cyclomatic complexity by class {$this->avg->ccn}
44+
Average Weighted method count by class {$this->avg->wmc}
45+
Average Relative system complexity {$this->avg->relativeSystemComplexity}
46+
Average Difficulty {$this->avg->difficulty}
4747
48-
Bugs
49-
Average bugs by class {$this->avg->bugs}
50-
Average defects by class (Kan) {$this->avg->kanDefect}
51-
Violations
52-
Critical {$this->sum->violations->critical}
53-
Error {$this->sum->violations->error}
54-
Warning {$this->sum->violations->warning}
55-
Information {$this->sum->violations->information}
48+
Bugs
49+
Average bugs by class {$this->avg->bugs}
50+
Average defects by class (Kan) {$this->avg->kanDefect}
51+
Violations
52+
Critical {$this->sum->violations->critical}
53+
Error {$this->sum->violations->error}
54+
Warning {$this->sum->violations->warning}
55+
Information {$this->sum->violations->information}
5656
EOT;
5757

5858
// git
@@ -78,10 +78,10 @@ public function getReport()
7878
if ($this->config->has('junit')) {
7979
$out .= <<<EOT
8080
81-
Unit testing
82-
Number of unit tests {$this->metrics->get('unitTesting')->get('nbSuites')}
83-
Classes called by tests {$this->metrics->get('unitTesting')->get('nbCoveredClasses')}
84-
Classes called by tests (percent) {$this->metrics->get('unitTesting')->get('percentCoveredClasses')} %
81+
Unit testing
82+
Number of unit tests {$this->metrics->get('unitTesting')->get('nbSuites')}
83+
Classes called by tests {$this->metrics->get('unitTesting')->get('nbCoveredClasses')}
84+
Classes called by tests (percent) {$this->metrics->get('unitTesting')->get('percentCoveredClasses')} %
8585
EOT;
8686
}
8787

tooling/composer.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
}
1313
],
1414
"require-dev": {
15-
"rector/rector": "^2.1",
16-
"friendsofphp/php-cs-fixer": "^3.76"
15+
"rector/rector": "^2.1"
1716
}
1817
}

0 commit comments

Comments
 (0)