View on GitHub


Test Coverage
# Contributing

If you contribute code, please make sure it conforms to the
MO4 coding standard
and that the unit tests still pass.
Whenever possible, add an auto fixer for coding standard violations. 

## Setup

We do recommend the following setup:

* make sure that [Composer]( is installed
* clone this repository

        git clone

* install all required dependencies

        composer install
* be sure that [Xdebug]( is installed, if you like to check code coverage.

## Coding Standard

To check the coding standard, execute in the repository root:


`phpcs` might report that some coding standard issues can be fixed automatically.
So give `phpcbf` a try and let it fix the issues for you:


## Tests

To run the unit tests, execute in the repository root:

To run the integration tests, execute

    ./vendor/bin/phpcs --standard=MO4 integrationtests/*.php

## Static analysis

We use [PHPStan]( and [Phan](, please refer to the
respective documentation for installation instructions.

    ./vendor/bin/phpstan analyse
    ./vendor/bin/phan -i

## Code Coverage

Make sure, that you write tests for your code.

Testing code coverage with [PHPUnit]( requires [Xdebug]( to be enabled.

You can generate a simple code coverage report by running in the repository root:

    ./vendor/bin/phpunit --coverage-text

In the case that Xdebug is disabled by default

     php -d vendor/bin/phpunit --coverage-text

will do the trick.

Please refer to the [PHPUnit Manual]( for further information about code coverage.