2017 © Pedro Peláez
 

library phpunit-code-quality

Automatically PHP check code quality once PHPUnit tests pass

image

drawmyattention/phpunit-code-quality

Automatically PHP check code quality once PHPUnit tests pass

  • Friday, October 20, 2017
  • by drawmyattention
  • Repository
  • 2 Watchers
  • 3 Stars
  • 14 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 1 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

PHPUnit Code Quality

Automatically check code quality once your PHPUnit tests pass., (*1)

Installation

Installation is performed via Composer., (*2)

composer require --dev drawmyattention/phpunit-code-quality

Register a test listener to your phpunit.xml file:, (*3)

<listeners>
    <listener class="DrawMyAttention\CodeQuality\Listeners\ComplexityAnalysisListener">
        <arguments>
            <object class="DrawMyAttention\CodeQuality\ComplexityAnalyser"/>
            <bool>true</bool>
        </arguments>
    </listener>
</listeners>

Configuring Project Settings

You can define which directories are scanned for code quality checking, as well as which directories and files are excluded. Sensible defaults are provided. By default, code stored in your src directory is checked, and any code in your tests directory is excluded., (*4)

You can create a complexity-analyser-config.php file in your project's root directory to specify alternative settings. See the provided config file, or copy and paste the following example:, (*5)


return [ // Directories which should be checked for code quality 'scan_directories' => [ 'src', ], // Directories which should not be checked 'excluded_directories' => [ 'app/Support', 'tests', ], // Files which should not be checked 'excluded_files' => [ 'app/Http/Controllers/SomeController.php', ], ];

Because this application utilises PHP Mess Detector to check code quality, you can define which rules should be applied when checking code quality. A full list of rules is available here., (*6)

Contributing

If you find a bug or would like to contribute to the development of this package, please submit a pull-request (with tests if possible)., (*7)

The Versions

20/10 2017

dev-master

9999999-dev

Automatically PHP check code quality once PHPUnit tests pass

  Sources   Download

MIT

The Requires

 

20/10 2017

1.0.1

1.0.1.0

Automatically PHP check code quality once PHPUnit tests pass

  Sources   Download

MIT

The Requires

 

27/08 2017

1.0.0

1.0.0.0

Automatically PHP check code quality once PHPUnit tests pass

  Sources   Download

MIT

The Requires