Skip to content

Improve development #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ test export-ignore
.gitignore export-ignore
.gitattributes export-ignore
phpunit.xml* export-ignore
phpcs.xml export-ignore
8 changes: 1 addition & 7 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
# Text-Editor backup files
*~

# ignore dependencies
vendor

# ignore test/coverage reports
test/coverage
coverage.clover.xml

# ignore phpunit cache
.phpunit.result.cache

# Ignore IDEs
.idea
.atom
15 changes: 13 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,21 @@
}
},
"scripts": {
"test": "vendor/bin/phpunit"
"test": "vendor/bin/phpunit",
"test-coverage-clover": "vendor/bin/phpunit --coverage-clover=coverage.clover.xml",
"test-coverage-html": "vendor/bin/phpunit --coverage-html=test/coverage",
"lint": "vendor/bin/phpcs --standard=phpcs.xml src/*"
},
"scripts-descriptions": {
"test": "Runs the phpunit testsuite",
"test-coverage-clover": "Runs the phpunit testsuite and generates coverage in the clover format in the file 'coverage.clover.xml'",
"test-coverage-html": "Runs the phpunit testsuite and generates coverage in html format in the directory 'test/coverage'.",
"lint": "Runs PHP_CodeSniffer on 'src/*'"
},
"require-dev": {
"php-mock/php-mock-prophecy": "^0.0.2",
"psr/container": "^1.0"
"psr/container": "^1.0",
"squizlabs/php_codesniffer": ">=3.4 <3.5.0",
"slevomat/coding-standard": "^5.0"
}
}
140 changes: 139 additions & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

52 changes: 52 additions & 0 deletions phpcs.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<?xml version="1.0" encoding="UTF-8"?>
<ruleset name="cross-phpunit-utils-standard">
<config name="installed_paths" value="../../slevomat/coding-standard"/>
<exclude-pattern>**/test/*</exclude-pattern>
<exclude-pattern>**/vendor/*</exclude-pattern>


<rule ref="PSR2">
<exclude name="Squiz.Functions.MultiLineFunctionDeclaration.Indent" />
</rule>
<rule ref="PSR12"/>
<rule ref="SlevomatCodingStandard.TypeHints.DeclareStrictTypes">
<properties>
<property name="newlinesCountBetweenOpenTagAndDeclare" value="2" />
<property name="newlinesCountAfterDeclare" value="2" />
<property name="spacesCountAroundEqualsSign" value="0" />
</properties>
</rule>
<rule ref="SlevomatCodingStandard.Arrays.DisallowImplicitArrayCreation" />
<rule ref="SlevomatCodingStandard.Classes.UnusedPrivateElements">
<properties>
<property name="alwaysUsedPropertiesAnnotations" type="array">
<element value="@ODM\" />
</property>
</properties>
</rule>
<rule ref="SlevomatCodingStandard.Functions.UnusedInheritedVariablePassedToClosure" />
<rule ref="SlevomatCodingStandard.Functions.UselessParameterDefaultValue" />
<rule ref="SlevomatCodingStandard.Namespaces.UnusedUses">
<properties>
<property name="searchAnnotations" value="true" />
</properties>
</rule>
<rule ref="SlevomatCodingStandard.Namespaces.UseFromSameNamespace" />
<rule ref="SlevomatCodingStandard.Namespaces.UselessAlias" />
<rule ref="SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses">
<properties>
<property name="caseSensitive" value="true" />
</properties>
</rule>
<rule ref="SlevomatCodingStandard.Namespaces.NamespaceDeclaration" />
<rule ref="SlevomatCodingStandard.Variables.UnusedVariable" />
<rule ref="SlevomatCodingStandard.Variables.UselessVariable" />
<rule ref="SlevomatCodingStandard.TypeHints.LongTypeHints" />
<rule ref="SlevomatCodingStandard.PHP.TypeCast" />
<rule ref="SlevomatCodingStandard.TypeHints.ReturnTypeHintSpacing">
<properties>
<property name="spacesCountBeforeColon" value="0" />
</properties>
</rule>
<rule ref="SlevomatCodingStandard.TypeHints.NullableTypeForNullDefaultValue" />
</ruleset>