File tree 5 files changed +43
-0
lines changed
5 files changed +43
-0
lines changed Original file line number Diff line number Diff line change 75
75
- name : PHP CS Fixer
76
76
run : composer lint:check
77
77
78
+ - name : PHP MD
79
+ run : composer phpmd
80
+
78
81
- name : PHPstan
79
82
run : composer phpstan
Original file line number Diff line number Diff line change @@ -61,6 +61,8 @@ composer lint:check
61
61
composer lint:fix
62
62
# PHPstan
63
63
composer phpstan
64
+ # PHPMD
65
+ composer phpmd
64
66
```
65
67
66
68
### Using the Docker Environment
Original file line number Diff line number Diff line change 29
29
"require-dev" : {
30
30
"doctrine/annotations" : " ^2.0" ,
31
31
"doctrine/orm" : " ^2.9" ,
32
+ "phpmd/phpmd" : " ^2.13" ,
32
33
"matthiasnoback/symfony-dependency-injection-test" : " ^4.3" ,
33
34
"nyholm/psr7" : " ^1.5.1" ,
34
35
"php-cs-fixer/shim" : " ^3.14" ,
62
63
}
63
64
},
64
65
"scripts" : {
66
+ "phpmd" : " ./vendor/bin/phpmd src text phpmd.xml" ,
65
67
"phpstan" : " ./vendor/bin/phpstan --memory-limit=1G --ansi" ,
66
68
"test:unit" : " ./vendor/bin/phpunit --colors=always --verbose" ,
67
69
"test:unit:coverage" : " XDEBUG_MODE=coverage ./vendor/bin/phpunit --colors=always --coverage-html=tests/coverage" ,
Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" ?>
2
+ <phpmd-baseline >
3
+ <violation rule =" PHPMD\Rule\CleanCode\IfStatementAssignment" file =" src/Command/IndexCommand.php" method =" getEntitiesFromArgs" />
4
+ <violation rule =" PHPMD\Rule\CleanCode\ElseExpression" file =" src/Command/MeiliSearchClearCommand.php" />
5
+ <violation rule =" PHPMD\Rule\CyclomaticComplexity" file =" src/Command/MeiliSearchCreateCommand.php" method =" execute" />
6
+ <violation rule =" PHPMD\Rule\CyclomaticComplexity" file =" src/Command/MeiliSearchImportCommand.php" method =" execute" />
7
+ <violation rule =" PHPMD\Rule\Design\NpathComplexity" file =" src/Command/MeiliSearchImportCommand.php" method =" execute" />
8
+ <violation rule =" PHPMD\Rule\Design\CountInLoopExpression" file =" src/Command/MeiliSearchImportCommand.php" />
9
+ <violation rule =" PHPMD\Rule\CleanCode\ElseExpression" file =" src/Command/MeiliSearchImportCommand.php" />
10
+ <violation rule =" PHPMD\Rule\CleanCode\IfStatementAssignment" file =" src/DependencyInjection/MeiliSearchExtension.php" method =" load" />
11
+ <violation rule =" PHPMD\Rule\Naming\LongVariable" file =" src/DependencyInjection/MeiliSearchExtension.php" />
12
+ <violation rule =" PHPMD\Rule\CleanCode\ElseExpression" file =" src/DependencyInjection/MeiliSearchExtension.php" />
13
+ <violation rule =" PHPMD\Rule\Naming\ShortVariable" file =" src/Engine.php" />
14
+ <violation rule =" PHPMD\Rule\Naming\LongVariable" file =" src/Model/Aggregator.php" />
15
+ <violation rule =" PHPMD\Rule\Naming\ShortVariable" file =" src/SearchableEntity.php" />
16
+ <violation rule =" PHPMD\Rule\CleanCode\ElseExpression" file =" src/SearchableEntity.php" />
17
+ <violation rule =" PHPMD\Rule\Design\TooManyPublicMethods" file =" src/Services/MeiliSearchService.php" />
18
+ <violation rule =" PHPMD\Rule\Design\CouplingBetweenObjects" file =" src/Services/MeiliSearchService.php" />
19
+ <violation rule =" PHPMD\Rule\Naming\LongVariable" file =" src/Services/MeiliSearchService.php" />
20
+ <violation rule =" PHPMD\Rule\CleanCode\StaticAccess" file =" src/Services/MeiliSearchService.php" />
21
+ <violation rule =" PHPMD\Rule\Naming\ShortVariable" file =" src/Services/MeiliSearchService.php" />
22
+ <violation rule =" PHPMD\Rule\CleanCode\ElseExpression" file =" src/Services/MeiliSearchService.php" />
23
+ </phpmd-baseline >
Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2
+ <ruleset name =" Ruleset"
3
+ xmlns =" http://pmd.sf.net/ruleset/1.0.0"
4
+ xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
5
+ xsi : schemaLocation =" http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd" >
6
+ <description >Ruleset for PHP Mess Detector that enforces coding standards</description >
7
+ <rule ref =" rulesets/cleancode.xml" />
8
+ <rule ref =" rulesets/codesize.xml" />
9
+ <rule ref =" rulesets/controversial.xml" />
10
+ <rule ref =" rulesets/design.xml" />
11
+ <rule ref =" rulesets/naming.xml" />
12
+ <rule ref =" rulesets/unusedcode.xml" />
13
+ </ruleset >
You can’t perform that action at this time.
0 commit comments