Skip to content

Commit 518f02b

Browse files
committed
Merge pull request #3
* pr-3: Improve development
2 parents 0e62a7b + 78281a5 commit 518f02b

File tree

5 files changed

+206
-10
lines changed

5 files changed

+206
-10
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ test export-ignore
22
.gitignore export-ignore
33
.gitattributes export-ignore
44
phpunit.xml* export-ignore
5+
phpcs.xml export-ignore

.gitignore

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,9 @@
1-
# Text-Editor backup files
2-
*~
3-
41
# ignore dependencies
52
vendor
63

74
# ignore test/coverage reports
85
test/coverage
6+
coverage.clover.xml
97

108
# ignore phpunit cache
119
.phpunit.result.cache
12-
13-
# Ignore IDEs
14-
.idea
15-
.atom

composer.json

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,21 @@
2828
}
2929
},
3030
"scripts": {
31-
"test": "vendor/bin/phpunit"
31+
"test": "vendor/bin/phpunit",
32+
"test-coverage-clover": "vendor/bin/phpunit --coverage-clover=coverage.clover.xml",
33+
"test-coverage-html": "vendor/bin/phpunit --coverage-html=test/coverage",
34+
"lint": "vendor/bin/phpcs --standard=phpcs.xml src/*"
35+
},
36+
"scripts-descriptions": {
37+
"test": "Runs the phpunit testsuite",
38+
"test-coverage-clover": "Runs the phpunit testsuite and generates coverage in the clover format in the file 'coverage.clover.xml'",
39+
"test-coverage-html": "Runs the phpunit testsuite and generates coverage in html format in the directory 'test/coverage'.",
40+
"lint": "Runs PHP_CodeSniffer on 'src/*'"
3241
},
3342
"require-dev": {
3443
"php-mock/php-mock-prophecy": "^0.0.2",
35-
"psr/container": "^1.0"
44+
"psr/container": "^1.0",
45+
"squizlabs/php_codesniffer": ">=3.4 <3.5.0",
46+
"slevomat/coding-standard": "^5.0"
3647
}
3748
}

composer.lock

Lines changed: 139 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

phpcs.xml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<ruleset name="cross-phpunit-utils-standard">
3+
<config name="installed_paths" value="../../slevomat/coding-standard"/>
4+
<exclude-pattern>**/test/*</exclude-pattern>
5+
<exclude-pattern>**/vendor/*</exclude-pattern>
6+
7+
8+
<rule ref="PSR2">
9+
<exclude name="Squiz.Functions.MultiLineFunctionDeclaration.Indent" />
10+
</rule>
11+
<rule ref="PSR12"/>
12+
<rule ref="SlevomatCodingStandard.TypeHints.DeclareStrictTypes">
13+
<properties>
14+
<property name="newlinesCountBetweenOpenTagAndDeclare" value="2" />
15+
<property name="newlinesCountAfterDeclare" value="2" />
16+
<property name="spacesCountAroundEqualsSign" value="0" />
17+
</properties>
18+
</rule>
19+
<rule ref="SlevomatCodingStandard.Arrays.DisallowImplicitArrayCreation" />
20+
<rule ref="SlevomatCodingStandard.Classes.UnusedPrivateElements">
21+
<properties>
22+
<property name="alwaysUsedPropertiesAnnotations" type="array">
23+
<element value="@ODM\" />
24+
</property>
25+
</properties>
26+
</rule>
27+
<rule ref="SlevomatCodingStandard.Functions.UnusedInheritedVariablePassedToClosure" />
28+
<rule ref="SlevomatCodingStandard.Functions.UselessParameterDefaultValue" />
29+
<rule ref="SlevomatCodingStandard.Namespaces.UnusedUses">
30+
<properties>
31+
<property name="searchAnnotations" value="true" />
32+
</properties>
33+
</rule>
34+
<rule ref="SlevomatCodingStandard.Namespaces.UseFromSameNamespace" />
35+
<rule ref="SlevomatCodingStandard.Namespaces.UselessAlias" />
36+
<rule ref="SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses">
37+
<properties>
38+
<property name="caseSensitive" value="true" />
39+
</properties>
40+
</rule>
41+
<rule ref="SlevomatCodingStandard.Namespaces.NamespaceDeclaration" />
42+
<rule ref="SlevomatCodingStandard.Variables.UnusedVariable" />
43+
<rule ref="SlevomatCodingStandard.Variables.UselessVariable" />
44+
<rule ref="SlevomatCodingStandard.TypeHints.LongTypeHints" />
45+
<rule ref="SlevomatCodingStandard.PHP.TypeCast" />
46+
<rule ref="SlevomatCodingStandard.TypeHints.ReturnTypeHintSpacing">
47+
<properties>
48+
<property name="spacesCountBeforeColon" value="0" />
49+
</properties>
50+
</rule>
51+
<rule ref="SlevomatCodingStandard.TypeHints.NullableTypeForNullDefaultValue" />
52+
</ruleset>

0 commit comments

Comments
 (0)