From 8c27c3d377f9a60e27df385c5724793b348eeba7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jean-Fran=C3=A7ois=20L=C3=A9pine?=
 <lepinejeanfrancois@gmail.com>
Date: Tue, 1 Jul 2025 06:55:12 +0200
Subject: [PATCH 1/2] Updated tests in order to be executed in PHP 8.4

---
 .github/workflows/ci.yml                      | 76 +++++++++++++++
 .gitignore                                    |  3 +
 .php-cs-fixer.php                             | 14 +++
 Makefile                                      |  8 +-
 composer.json                                 | 10 +-
 doc/contributing.md                           | 21 +++++
 phpcs.xml.dist                                | 93 -------------------
 phpunit.xml.dist                              | 16 +---
 rector.php                                    | 19 ++++
 src/Hal/Application/Analyze.php               |  4 +-
 src/Hal/Application/Application.php           | 13 ++-
 src/Hal/Application/Config/Config.php         |  2 +-
 .../Application/Config/ConfigException.php    |  6 +-
 .../Config/File/ConfigFileReaderJson.php      |  2 +-
 src/Hal/Application/Config/Parser.php         |  1 +
 src/Hal/Component/Ast/NodeTraverser.php       |  5 +-
 src/Hal/Component/Ast/Php5NodeTraverser.php   |  1 +
 src/Hal/Component/Ast/Traverser.php           |  2 +-
 src/Hal/Component/File/Finder.php             |  1 -
 src/Hal/Component/Issue/Issuer.php            | 44 +++++----
 src/Hal/Component/Output/ProgressBar.php      |  1 -
 src/Hal/Component/Output/TestOutput.php       |  4 +-
 src/Hal/Component/Tree/GraphException.php     |  4 +-
 src/Hal/Component/Tree/Node.php               |  1 -
 src/Hal/Metric/BagTrait.php                   |  1 +
 src/Hal/Metric/ClassMetric.php                |  1 +
 src/Hal/Metric/Class_/ClassEnumVisitor.php    |  3 +-
 .../Class_/Complexity/KanDefectVisitor.php    |  1 +
 .../Component/MaintainabilityIndexVisitor.php |  7 +-
 .../Class_/Coupling/ExternalsVisitor.php      | 28 +++---
 .../Metric/Class_/Structural/LcomVisitor.php  |  2 +-
 .../Structural/SystemComplexityVisitor.php    |  2 +-
 .../Metric/Class_/Text/HalsteadVisitor.php    |  5 +-
 src/Hal/Metric/Class_/Text/LengthVisitor.php  |  6 +-
 src/Hal/Metric/Consolidated.php               |  9 +-
 src/Hal/Metric/FileMetric.php                 |  1 +
 src/Hal/Metric/FunctionMetric.php             |  1 +
 .../Metric/Helper/RoleOfMethodDetector.php    |  3 +-
 src/Hal/Metric/InterfaceMetric.php            |  6 +-
 src/Hal/Metric/Metric.php                     |  1 +
 src/Hal/Metric/Metrics.php                    |  1 -
 .../Package/PackageCollectingVisitor.php      |  6 +-
 src/Hal/Metric/Package/PackageDistance.php    |  1 +
 src/Hal/Metric/Package/PackageInstability.php |  1 +
 src/Hal/Metric/PackageMetric.php              |  6 +-
 src/Hal/Metric/ProjectMetric.php              |  1 +
 src/Hal/Metric/Registry.php                   |  4 +-
 src/Hal/Metric/SearchMetric.php               |  1 +
 src/Hal/Metric/System/Changes/GitChanges.php  |  2 +-
 src/Hal/Metric/System/Coupling/Coupling.php   |  1 -
 .../Coupling/DepthOfInheritanceTree.php       |  1 -
 src/Hal/Metric/System/Coupling/PageRank.php   |  1 -
 .../System/Packages/Composer/Composer.php     |  7 +-
 .../System/Packages/Composer/Packagist.php    |  8 +-
 .../Metric/System/UnitTesting/UnitTesting.php | 10 +-
 src/Hal/Report/Cli/Reporter.php               |  2 +-
 src/Hal/Report/Cli/SearchReporter.php         |  2 +-
 src/Hal/Report/Cli/SummaryWriter.php          | 90 +++++++++---------
 src/Hal/Report/Csv/Reporter.php               |  1 +
 src/Hal/Report/Html/Reporter.php              |  6 +-
 src/Hal/Report/Json/Reporter.php              |  2 +-
 src/Hal/Report/Json/SummaryWriter.php         |  2 +-
 src/Hal/Report/Violations/Xml/Reporter.php    |  4 +-
 src/Hal/Search/Search.php                     |  8 +-
 src/Hal/Search/Searches.php                   |  1 -
 src/Hal/Search/SearchesValidator.php          |  4 +-
 src/Hal/Violation/Class_/Blob.php             | 12 +--
 src/Hal/Violation/Class_/ProbablyBugged.php   | 12 +--
 .../Violation/Class_/TooComplexClassCode.php  |  9 +-
 .../Violation/Class_/TooComplexMethodCode.php |  7 +-
 src/Hal/Violation/Class_/TooDependent.php     |  8 +-
 src/Hal/Violation/Class_/TooLong.php          | 10 +-
 .../Package/StableAbstractionsPrinciple.php   |  6 +-
 .../Package/StableDependenciesPrinciple.php   |  8 +-
 .../SearchShouldNotBeFoundPrinciple.php       |  1 -
 src/Hal/Violation/Violation.php               |  1 +
 src/Hal/Violation/ViolationParser.php         |  3 +-
 src/Hal/Violation/Violations.php              |  1 +
 src/functions.php                             | 18 ++--
 .../Config/File/ConfigFileReaderTest.php      |  4 +-
 tests/Application/Config/ParserTest.php       |  4 +-
 tests/Component/Ast/NodeTraverserTest.php     |  2 +-
 tests/Component/File/FinderTest.php           |  4 +-
 tests/Component/Issuer/IssuerTest.php         | 30 +++---
 .../Component/Tree/GraphDeduplicatedTest.php  |  2 +-
 tests/Component/Tree/GraphTest.php            | 26 ++----
 tests/Component/Tree/HashMapTest.php          |  4 +-
 tests/Component/Tree/NodeTest.php             |  2 +-
 .../Tree/Operator/CycleDetectorTest.php       |  8 +-
 .../Tree/Operator/SizeOfTreeTest.php          | 14 ++-
 tests/Metric/Class_/ClassEnumVisitorTest.php  | 16 ++--
 .../CyclomaticComplexityVisitorTest.php       |  6 +-
 .../Complexity/KanDefectVisitorTest.php       |  4 +-
 .../SystemComplexityVisitorTest.php           |  4 +-
 .../MaintainabilityIndexVisitorTest.php       | 46 ++++-----
 .../Class_/Coupling/ExternalsVisitorTest.php  |  8 +-
 .../Class_/Structural/LcomVisitorTest.php     |  4 +-
 .../Class_/Text/HalsteadVisitorTest.php       |  4 +-
 .../Metric/Class_/Text/LengthVisitorTest.php  |  4 +-
 .../Helper/RoleOfMethodDetectorTest.php       |  4 +-
 .../Metric/Package/PackageAbstractionTest.php |  2 +-
 .../Package/PackageCollectingVisitorTest.php  |  6 +-
 .../Package/PackageDependenciesTest.php       |  6 +-
 tests/Metric/Package/PackageDistanceTest.php  |  2 +-
 .../Metric/Package/PackageInstabilityTest.php |  6 +-
 tests/Metric/PackageMetricTest.php            | 28 +++---
 .../System/UnitTesting/UnitTestingTest.php    | 10 +-
 tests/Polyfill/TestCaseCompatible.php         | 19 ++++
 tests/Polyfill/each.php                       | 38 ++++++++
 tests/Polyfill/testcase.php                   |  8 ++
 .../Html/ComplexityReportRegressionTest.php   | 28 ++++--
 tests/Report/Html/ReporterTest.php            |  7 +-
 tests/Search/SearchFactoryTest.php            |  2 +-
 tests/Search/SearchTest.php                   |  8 +-
 tests/Violation/Class_/BlobTest.php           |  4 +-
 .../StableAbstractionsPrincipleTest.php       | 16 ++--
 .../StableDependenciesPrincipleTest.php       |  4 +-
 tests/binary/BinTest.php                      | 11 ++-
 tests/binary/PharTest.php                     |  9 +-
 tests/binary/ReportTest.php                   | 13 +--
 tests/bootstrap.php                           | 12 +++
 tooling/README.md                             |  5 +
 tooling/composer.json                         | 19 ++++
 123 files changed, 647 insertions(+), 513 deletions(-)
 create mode 100644 .github/workflows/ci.yml
 create mode 100644 .php-cs-fixer.php
 delete mode 100644 phpcs.xml.dist
 create mode 100644 rector.php
 create mode 100644 tests/Polyfill/TestCaseCompatible.php
 create mode 100644 tests/Polyfill/each.php
 create mode 100644 tests/Polyfill/testcase.php
 create mode 100644 tests/bootstrap.php
 create mode 100644 tooling/README.md
 create mode 100644 tooling/composer.json

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 00000000..0a8ccfd5
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,76 @@
+name: CI
+
+on:
+    push:
+        branches: [ master, main ]
+    pull_request:
+        branches: [ master, main ]
+    release:
+        types: [created]
+
+jobs:
+    test:
+        runs-on: ubuntu-latest
+        strategy:
+            matrix:
+                php-version: [5.6, 7.0, 7.1, 7.2, 7.3, 7.4, 8.0, 8.1, 8.2, 8.3, 8.4]
+                include:
+                    - php-version: nightly
+            fail-fast: false
+
+        services:
+            docker:
+                image: docker:20.10.16
+                options: --privileged
+
+        steps:
+            - uses: actions/checkout@v4
+
+            - name: Set up PHP ${{ matrix.php-version }}
+              uses: shivammathur/setup-php@v2
+              with:
+                  php-version: ${{ matrix.php-version }}
+
+            - name: "Remove ': void' return type hint for older PHP versions"
+              run: |
+                # if php version < 7.1, remove ': void' return type hint
+                php -v
+                if [[ "${{ matrix.php-version }}" < "7.1" ]]; then
+                    echo "Removing ': void' return type hint for PHP version ${{ matrix.php-version }}"
+                    # Find and replace ': void' in all PHP files
+                    find . -type f -name "*.php" -exec sed -i 's/: void//g' {} +
+                fi
+
+            - name: Install Composer dependencies (${{ matrix.php-version }})
+              run: composer install --no-interaction --prefer-dist --no-progress
+
+            - name: Run tests (${{ matrix.php-version }})
+              run: make test
+
+            - name: Run Docker tests
+              run: docker run --rm test_phpmetrics
+
+    build:
+        if: github.event_name == 'release' && startsWith(github.ref, 'refs/tags/')
+        needs: test
+        runs-on: ubuntu-latest
+        steps:
+            -   uses: actions/checkout@v4
+
+            -   name: Set up PHP
+                uses: shivammathur/setup-php@v2
+                with:
+                    php-version: 7.0
+
+            -   name: Build project
+                run: make build
+
+            -   name: Add build artifact
+                run: git add -f build/phpmetrics.phar
+
+            -   name: Upload release asset
+                uses: softprops/action-gh-release@v2
+                with:
+                    files: build/phpmetrics.phar
+                env:
+                    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/.gitignore b/.gitignore
index 2799b96c..b3822bda 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,6 @@
 composer.lock
 vendor
+tooling/vendor
 .idea
 md5sums
 control
@@ -8,3 +9,5 @@ build/phpmetrics.dsc
 build/phpmetrics.deb
 build/phpmetrics.tar.gz
 build/phpmetrics.changes
+.php-cs-fixer.cache
+.phpunit.result.cache
diff --git a/.php-cs-fixer.php b/.php-cs-fixer.php
new file mode 100644
index 00000000..779c7070
--- /dev/null
+++ b/.php-cs-fixer.php
@@ -0,0 +1,14 @@
+<?php
+
+$finder = (new PhpCsFixer\Finder())
+    ->in(__DIR__ . '/src')
+;
+
+return (new PhpCsFixer\Config())
+    ->setRules([
+        '@PER-CS' => true,
+        '@PHP82Migration' => true,
+    ])
+    ->setFinder($finder)
+    ->setUnsupportedPhpVersionAllowed(true)
+    ;
diff --git a/Makefile b/Makefile
index eeb073e8..85dfc726 100644
--- a/Makefile
+++ b/Makefile
@@ -2,17 +2,13 @@
 
 include artifacts/Makefile
 
-# Run unit tests
+# Run unit tests
 test:
 	./vendor/bin/phpunit -c phpunit.xml.dist
 
 # Codesniffer check
 phpcs:
-	./vendor/bin/phpcs src/ tests/ --extensions=php -n
-
-# Codesniffer fix
-phpcbf:
-	./vendor/bin/phpcbf src/ tests/ --extensions=php -n
+	./tooling/vendor/bin/php-cs-fixer check src
 
 # Used for tag releasing
 # Don't use directly, use `make release` instead
diff --git a/composer.json b/composer.json
index 475f1de7..509164ca 100644
--- a/composer.json
+++ b/composer.json
@@ -31,21 +31,17 @@
         "files": ["./src/functions.php"]
     },
     "require": {
-        "php": ">=5.5",
         "ext-dom": "*",
         "ext-tokenizer": "*",
         "nikic/php-parser": "^3|^4"
     },
-    "require-dev": {
-        "phpunit/phpunit": "^4.8.36 || ^5.7.27 || ^6.5.14",
-        "sebastian/comparator": ">=1.2.3",
-        "squizlabs/php_codesniffer": "^3.5",
-        "symfony/dom-crawler": "^3.0 || ^4.0 || ^5.0"
-    },
     "bin": [
         "bin/phpmetrics"
     ],
     "config": {
         "sort-packages": true
+    },
+    "require-dev": {
+        "phpunit/phpunit": "*"
     }
 }
diff --git a/doc/contributing.md b/doc/contributing.md
index 918470fa..be51ba63 100644
--- a/doc/contributing.md
+++ b/doc/contributing.md
@@ -11,6 +11,27 @@ Then, in order to run the test suite:
 
 Thanks for your help.
 
+## Why the code is so old?
+
+### Philosophy
+
+PhpMetrics has several goals:
++ be stable
++ be performant
++ run on the **maximum of PHP versions** (PHP 5.3 to PHP 8.4)
++ be installable everywhere, **without dependency conflicts**
+
+For these reasons, the code of PhpMetrics is intentionally written in "legacy" PHP.
+
+### Dependencies
+
+Not all projects are on the latest version of PHP, Symfony, or Laravel. Yes, there are projects that use Symfony 2. And these projects may also need metrics and quality.
+
+For these reasons, PhpMetrics comes with the minimum of dependencies. Only the dependency on `nikic/php-parser` is accepted.
+
+No Pull Request that modifies the `require` block will be accepted.
+
+
 ## Releasing
 
 Please NEVER tag manually.
diff --git a/phpcs.xml.dist b/phpcs.xml.dist
deleted file mode 100644
index 28f5b8a4..00000000
--- a/phpcs.xml.dist
+++ /dev/null
@@ -1,93 +0,0 @@
-<?xml version="1.0"?>
-<ruleset name="PhpMetrics"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:noNamespaceSchemaLocation="./vendor/squizlabs/php_codesniffer/phpcs.xsd"
->
-    <description>The coding standard of PhpMetrics package</description>
-
-    <arg value="p"/>
-
-    <config name="ignore_warnings_on_exit" value="1"/>
-
-    <arg name="colors"/>
-    <arg value="s"/>
-
-    <rule ref="PSR2">
-        <exclude-pattern>*/tests/*/examples/*.php</exclude-pattern>
-        <exclude-pattern>*/src/functions.php</exclude-pattern>
-    </rule>
-
-    <rule ref="PSR1.Classes.ClassDeclaration.MultipleClasses">
-        <exclude-pattern>*/tests/*</exclude-pattern>
-    </rule>
-
-    <rule ref="Generic.Arrays.DisallowLongArraySyntax"/>
-
-    <rule ref="Generic.Formatting.NoSpaceAfterCast"/>
-
-    <!-- Forbid PHP 4 constructors -->
-    <rule ref="Generic.NamingConventions.ConstructorName"/>
-    <rule ref="Generic.PHP.CharacterBeforePHPOpeningTag"/>
-    <rule ref="Generic.PHP.ForbiddenFunctions">
-        <properties>
-            <property name="forbiddenFunctions" type="array">
-                <element key="chop" value="rtrim"/>
-                <element key="close" value="closedir"/>
-                <element key="compact" value="null"/>
-                <element key="delete" value="unset"/>
-                <element key="doubleval" value="floatval"/>
-                <element key="extract" value="null"/>
-                <element key="fputs" value="fwrite"/>
-                <element key="ini_alter" value="ini_set"/>
-                <element key="is_double" value="is_float"/>
-                <element key="is_integer" value="is_int"/>
-                <element key="is_long" value="is_int"/>
-                <element key="is_null" value="null"/>
-                <element key="is_real" value="is_float"/>
-                <element key="is_writeable" value="is_writable"/>
-                <element key="join" value="implode"/>
-                <element key="key_exists" value="array_key_exists"/>
-                <element key="pos" value="current"/>
-                <element key="settype" value="null"/>
-                <element key="show_source" value="highlight_file"/>
-                <element key="sizeof" value="count"/>
-                <element key="strchr" value="strstr"/>
-            </property>
-        </properties>
-    </rule>
-
-    <rule ref="Squiz.Classes.LowercaseClassKeywords"/>
-    <rule ref="Squiz.Operators.ValidLogicalOperators"/>
-
-    <!-- Spacing rules -->
-    <rule ref="Squiz.Strings.ConcatenationSpacing">
-        <properties>
-            <!-- The one space policy is applied according to PSR-12 -->
-            <property name="spacing" value="1"/>
-            <property name="ignoreNewlines" value="true"/>
-        </properties>
-    </rule>
-
-    <rule ref="Squiz.PHP.Eval"/>
-    <rule ref="Squiz.PHP.LowercasePHPFunctions"/>
-
-    <rule ref="Squiz.WhiteSpace.FunctionOpeningBraceSpace" />
-    <rule ref="Squiz.WhiteSpace.SemicolonSpacing"/>
-    <rule ref="Squiz.WhiteSpace.SuperfluousWhitespace">
-        <properties>
-            <property name="ignoreBlankLines" value="false"/>
-        </properties>
-    </rule>
-    <rule ref="Squiz.WhiteSpace.SuperfluousWhitespace.StartFile">
-        <severity>10</severity>
-    </rule>
-    <rule ref="Squiz.WhiteSpace.SuperfluousWhitespace.EndFile">
-        <severity>10</severity>
-    </rule>
-    <rule ref="Squiz.WhiteSpace.SuperfluousWhitespace.EmptyLines">
-        <severity>10</severity>
-    </rule>
-
-    <!-- Do not use a close tag for PHP -->
-    <rule ref="Zend.Files.ClosingTag"/>
-</ruleset>
diff --git a/phpunit.xml.dist b/phpunit.xml.dist
index de4ebec4..ec987918 100644
--- a/phpunit.xml.dist
+++ b/phpunit.xml.dist
@@ -1,15 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
 
-<phpunit backupGlobals="false"
-         backupStaticAttributes="false"
+<phpunit
+         backupGlobals="false"
          colors="true"
-         convertErrorsToExceptions="true"
-         convertNoticesToExceptions="true"
-         convertWarningsToExceptions="true"
          processIsolation="false"
          stopOnFailure="false"
-         syntaxCheck="false"
-         bootstrap="./vendor/autoload.php"
+         bootstrap="./tests/bootstrap.php"
         >
 
     <testsuites>
@@ -23,10 +19,4 @@
             <group>binary</group>
         </exclude>
     </groups>
-
-    <filter>
-        <whitelist>
-            <directory>./src</directory>
-        </whitelist>
-    </filter>
 </phpunit>
diff --git a/rector.php b/rector.php
new file mode 100644
index 00000000..c9a4ae89
--- /dev/null
+++ b/rector.php
@@ -0,0 +1,19 @@
+<?php
+
+use Rector\Config\RectorConfig;
+
+return RectorConfig::configure()
+    ->withPaths([
+        __DIR__ . '/src',
+        __DIR__ . '/tests',
+    ])
+    ->withSets([
+        \Rector\PHPUnit\Set\PHPUnitSetList::PHPUNIT_110,
+    ])
+    ->withRules([
+        \Rector\TypeDeclaration\Rector\Class_\AddTestsVoidReturnTypeWhereNoReturnRector::class,
+        \Rector\PHPUnit\CodeQuality\Rector\Class_\AddParentSetupCallOnSetupRector::class,
+        \Rector\PHPUnit\PHPUnit60\Rector\ClassMethod\ExceptionAnnotationRector::class,
+        \Rector\PHPUnit\PHPUnit100\Rector\StmtsAwareInterface\WithConsecutiveRector::class,
+        \Rector\PHPUnit\PHPUnit100\Rector\Class_\StaticDataProviderClassMethodRector::class,
+    ]);
diff --git a/src/Hal/Application/Analyze.php b/src/Hal/Application/Analyze.php
index eec78e2c..7ed5c973 100644
--- a/src/Hal/Application/Analyze.php
+++ b/src/Hal/Application/Analyze.php
@@ -1,4 +1,5 @@
 <?php
+
 namespace Hal\Application;
 
 use Hal\Application\Config\Config;
@@ -35,7 +36,6 @@
  */
 class Analyze
 {
-
     /**
      * @var Output
      */
@@ -77,7 +77,7 @@ public function run($files)
         };
 
         // prepare parser
-        $parser = (new ParserFactory)->create(ParserFactory::PREFER_PHP7);
+        $parser = (new ParserFactory())->create(ParserFactory::PREFER_PHP7);
         $traverser = new NodeTraverser(false, $whenToStop);
         $traverser->addVisitor(new \PhpParser\NodeVisitor\NameResolver());
         $traverser->addVisitor(new ClassEnumVisitor($metrics));
diff --git a/src/Hal/Application/Application.php b/src/Hal/Application/Application.php
index cc9544f1..5b755fe7 100644
--- a/src/Hal/Application/Application.php
+++ b/src/Hal/Application/Application.php
@@ -17,7 +17,6 @@
 
 class Application
 {
-
     /**
      * @param array $argv
      */
@@ -46,8 +45,10 @@ public function run(array $argv)
 
         // Version
         if ($config->has('version')) {
-            $output->writeln(sprintf("PhpMetrics %s <http://www.phpmetrics.org>\nby Jean-François Lépine <https://twitter.com/Halleck45>\n",
-                getVersion()));
+            $output->writeln(sprintf(
+                "PhpMetrics %s <http://www.phpmetrics.org>\nby Jean-François Lépine <https://twitter.com/Halleck45>\n",
+                getVersion()
+            ));
             exit(0);
         }
 
@@ -113,8 +114,10 @@ public function run(array $argv)
         }
         if (!empty($shouldExitDueToCriticalViolationsCount)) {
             $output->writeln('');
-            $output->writeln(sprintf('<error>[ERR] Failed du to %d critical violations</error>',
-                $shouldExitDueToCriticalViolationsCount));
+            $output->writeln(sprintf(
+                '<error>[ERR] Failed du to %d critical violations</error>',
+                $shouldExitDueToCriticalViolationsCount
+            ));
             $output->writeln('');
             exit(1);
         }
diff --git a/src/Hal/Application/Config/Config.php b/src/Hal/Application/Config/Config.php
index 9dc0cf28..ab4d991d 100644
--- a/src/Hal/Application/Config/Config.php
+++ b/src/Hal/Application/Config/Config.php
@@ -1,9 +1,9 @@
 <?php
+
 namespace Hal\Application\Config;
 
 class Config
 {
-
     /**
      * @var array
      */
diff --git a/src/Hal/Application/Config/ConfigException.php b/src/Hal/Application/Config/ConfigException.php
index 6238abe4..7063df2c 100644
--- a/src/Hal/Application/Config/ConfigException.php
+++ b/src/Hal/Application/Config/ConfigException.php
@@ -1,7 +1,5 @@
 <?php
-namespace Hal\Application\Config;
 
-class ConfigException extends \Exception
-{
+namespace Hal\Application\Config;
 
-}
+class ConfigException extends \Exception {}
diff --git a/src/Hal/Application/Config/File/ConfigFileReaderJson.php b/src/Hal/Application/Config/File/ConfigFileReaderJson.php
index 8dc615cc..ce0164e4 100644
--- a/src/Hal/Application/Config/File/ConfigFileReaderJson.php
+++ b/src/Hal/Application/Config/File/ConfigFileReaderJson.php
@@ -78,7 +78,7 @@ protected function parseJson($jsonData, Config $config)
 
         // Composer
         if (array_key_exists('composer', $jsonData)) {
-            $config->set('composer', (bool)$jsonData['composer']);
+            $config->set('composer', (bool) $jsonData['composer']);
         }
 
         // Search
diff --git a/src/Hal/Application/Config/Parser.php b/src/Hal/Application/Config/Parser.php
index 2e675366..7cec93d2 100644
--- a/src/Hal/Application/Config/Parser.php
+++ b/src/Hal/Application/Config/Parser.php
@@ -1,4 +1,5 @@
 <?php
+
 namespace Hal\Application\Config;
 
 use Hal\Application\Config\File\ConfigFileReaderFactory;
diff --git a/src/Hal/Component/Ast/NodeTraverser.php b/src/Hal/Component/Ast/NodeTraverser.php
index 78d4a600..ef8aeefe 100644
--- a/src/Hal/Component/Ast/NodeTraverser.php
+++ b/src/Hal/Component/Ast/NodeTraverser.php
@@ -1,4 +1,5 @@
 <?php
+
 /*
  * (c) Jean-François Lépine <https://twitter.com/Halleck45>
  *
@@ -21,6 +22,4 @@ class_alias(Php5NodeTraverser::class, __NAMESPACE__ . '\\ActualNodeTraverser');
  * @see https://github.com/phpmetrics/PhpMetrics/issues/373
  */
 /** @noinspection PhpUndefinedClassInspection */
-class NodeTraverser extends ActualNodeTraverser
-{
-}
+class NodeTraverser extends ActualNodeTraverser {}
diff --git a/src/Hal/Component/Ast/Php5NodeTraverser.php b/src/Hal/Component/Ast/Php5NodeTraverser.php
index c2ac9420..29e9df60 100644
--- a/src/Hal/Component/Ast/Php5NodeTraverser.php
+++ b/src/Hal/Component/Ast/Php5NodeTraverser.php
@@ -1,4 +1,5 @@
 <?php
+
 namespace Hal\Component\Ast;
 
 use PhpParser\Node;
diff --git a/src/Hal/Component/Ast/Traverser.php b/src/Hal/Component/Ast/Traverser.php
index 7a89971a..39299c54 100644
--- a/src/Hal/Component/Ast/Traverser.php
+++ b/src/Hal/Component/Ast/Traverser.php
@@ -66,7 +66,7 @@ public function traverseArray(array $nodes, array $visitors)
                     $return = $visitor->enterNode($node);
                     if (Mother::DONT_TRAVERSE_CHILDREN === $return) {
                         $traverseChildren = false;
-                    } else if (null !== $return) {
+                    } elseif (null !== $return) {
                         $node = $return;
                     }
                 }
diff --git a/src/Hal/Component/File/Finder.php b/src/Hal/Component/File/Finder.php
index 5ae3ce03..6269b6ae 100644
--- a/src/Hal/Component/File/Finder.php
+++ b/src/Hal/Component/File/Finder.php
@@ -18,7 +18,6 @@
  */
 class Finder
 {
-
     /**
      * Follow symlinks
      */
diff --git a/src/Hal/Component/Issue/Issuer.php b/src/Hal/Component/Issue/Issuer.php
index 58c802e1..a8c54ad0 100644
--- a/src/Hal/Component/Issue/Issuer.php
+++ b/src/Hal/Component/Issue/Issuer.php
@@ -72,43 +72,41 @@ public function onError($errno, $errstr, $errfile, $errline)
 
         $message = <<<EOT
 
-<error>We're sorry : an unexpected error occured.</error>
- 
-<question>Can you help us ?</question> Please open a new issue at https://github.com/phpmetrics/PhpMetrics/issues/new, and copy-paste the content 
-of this file: $logfile ?
+            <error>We're sorry : an unexpected error occured.</error>
 
-Thanks for your help :)
+            <question>Can you help us ?</question> Please open a new issue at https://github.com/phpmetrics/PhpMetrics/issues/new, and copy-paste the content
+            of this file: $logfile ?
 
+            Thanks for your help :)
 EOT;
 
         $log = <<<EOT
-## Title: $errstr
+            ## Title: $errstr
 
-## Message:
+            ## Message:
 
-Hi,
+            Hi,
 
-This issue occured:
+            This issue occured:
 
-$errstr
+            $errstr
 
-**Environment**
+            **Environment**
 
-+ PHP: $php
-+ PhpMetrics: $phpmetrics
-+ Operating System: $os
-+ File: $errfile (line $errline)
+            + PHP: $php
+            + PhpMetrics: $phpmetrics
+            + Operating System: $os
+            + File: $errfile (line $errline)
 
-<details>
-  <summary>Details</summary>
-  ```
-$trace
+            <details>
+              <summary>Details</summary>
+              ```
+            $trace
 
 
-$debug
-```
-</details>
-
+            $debug
+            ```
+            </details>
 EOT;
 
         $this->output->write($message);
diff --git a/src/Hal/Component/Output/ProgressBar.php b/src/Hal/Component/Output/ProgressBar.php
index c5715d75..8ffeb510 100644
--- a/src/Hal/Component/Output/ProgressBar.php
+++ b/src/Hal/Component/Output/ProgressBar.php
@@ -14,7 +14,6 @@
  */
 class ProgressBar
 {
-
     /**
      * @var Output
      */
diff --git a/src/Hal/Component/Output/TestOutput.php b/src/Hal/Component/Output/TestOutput.php
index 35700a52..f5b70ab2 100644
--- a/src/Hal/Component/Output/TestOutput.php
+++ b/src/Hal/Component/Output/TestOutput.php
@@ -47,9 +47,7 @@ public function err($message)
     /**
      * @inheritdoc
      */
-    public function clearln()
-    {
-    }
+    public function clearln() {}
 
     /**
      * @inheritdoc
diff --git a/src/Hal/Component/Tree/GraphException.php b/src/Hal/Component/Tree/GraphException.php
index 4682071c..428d3202 100644
--- a/src/Hal/Component/Tree/GraphException.php
+++ b/src/Hal/Component/Tree/GraphException.php
@@ -9,6 +9,4 @@
 
 namespace Hal\Component\Tree;
 
-class GraphException extends \LogicException
-{
-}
+class GraphException extends \LogicException {}
diff --git a/src/Hal/Component/Tree/Node.php b/src/Hal/Component/Tree/Node.php
index f472a944..48f01025 100644
--- a/src/Hal/Component/Tree/Node.php
+++ b/src/Hal/Component/Tree/Node.php
@@ -11,7 +11,6 @@
 
 class Node
 {
-
     /**
      * @var mixed
      */
diff --git a/src/Hal/Metric/BagTrait.php b/src/Hal/Metric/BagTrait.php
index c7440816..0a2d792f 100644
--- a/src/Hal/Metric/BagTrait.php
+++ b/src/Hal/Metric/BagTrait.php
@@ -1,4 +1,5 @@
 <?php
+
 namespace Hal\Metric;
 
 trait BagTrait
diff --git a/src/Hal/Metric/ClassMetric.php b/src/Hal/Metric/ClassMetric.php
index d8330955..a3e1f87f 100644
--- a/src/Hal/Metric/ClassMetric.php
+++ b/src/Hal/Metric/ClassMetric.php
@@ -1,4 +1,5 @@
 <?php
+
 namespace Hal\Metric;
 
 class ClassMetric implements Metric, \JsonSerializable
diff --git a/src/Hal/Metric/Class_/ClassEnumVisitor.php b/src/Hal/Metric/Class_/ClassEnumVisitor.php
index e3a277a2..ceac7d45 100644
--- a/src/Hal/Metric/Class_/ClassEnumVisitor.php
+++ b/src/Hal/Metric/Class_/ClassEnumVisitor.php
@@ -1,4 +1,5 @@
 <?php
+
 namespace Hal\Metric\Class_;
 
 use Hal\Metric\ClassMetric;
@@ -50,7 +51,7 @@ public function leaveNode(Node $node)
             $roleDetector = new RoleOfMethodDetector();
             foreach ($node->stmts as $stmt) {
                 if ($stmt instanceof Stmt\ClassMethod) {
-                    $function = new FunctionMetric((string)$stmt->name);
+                    $function = new FunctionMetric((string) $stmt->name);
 
                     $role = $roleDetector->detects($stmt);
                     $function->set('role', $role);
diff --git a/src/Hal/Metric/Class_/Complexity/KanDefectVisitor.php b/src/Hal/Metric/Class_/Complexity/KanDefectVisitor.php
index b2492260..fa873ddd 100644
--- a/src/Hal/Metric/Class_/Complexity/KanDefectVisitor.php
+++ b/src/Hal/Metric/Class_/Complexity/KanDefectVisitor.php
@@ -1,4 +1,5 @@
 <?php
+
 namespace Hal\Metric\Class_\Complexity;
 
 use Hal\Component\Reflected\Method;
diff --git a/src/Hal/Metric/Class_/Component/MaintainabilityIndexVisitor.php b/src/Hal/Metric/Class_/Component/MaintainabilityIndexVisitor.php
index 3d33a4d9..0ced2efc 100644
--- a/src/Hal/Metric/Class_/Component/MaintainabilityIndexVisitor.php
+++ b/src/Hal/Metric/Class_/Component/MaintainabilityIndexVisitor.php
@@ -1,4 +1,5 @@
 <?php
+
 namespace Hal\Metric\Class_\Component;
 
 use Hal\Metric\FunctionMetric;
@@ -27,7 +28,6 @@
  */
 class MaintainabilityIndexVisitor extends NodeVisitorAbstract
 {
-
     /**
      * @var Metrics
      */
@@ -47,7 +47,7 @@ public function __construct(Metrics $metrics)
     public function leaveNode(Node $node)
     {
         if ($node instanceof Stmt\Class_ || $node instanceof Stmt\Trait_) {
-            $name = (string)(isset($node->namespacedName) ? $node->namespacedName : 'anonymous@' . spl_object_hash($node));
+            $name = isset($node->namespacedName) ? (string) $node->namespacedName : 'anonymous@' . spl_object_hash($node);
             $classOrFunction = $this->metrics->get($name);
 
             if (null === $lloc = $classOrFunction->get('lloc')) {
@@ -68,7 +68,8 @@ public function leaveNode(Node $node)
 
             // maintainability index without comment
             $MIwoC = max(
-                (171
+                (
+                    171
                     - (5.2 * \log($volume))
                     - (0.23 * $ccn)
                     - (16.2 * \log($lloc))
diff --git a/src/Hal/Metric/Class_/Coupling/ExternalsVisitor.php b/src/Hal/Metric/Class_/Coupling/ExternalsVisitor.php
index 86acf15c..98255742 100644
--- a/src/Hal/Metric/Class_/Coupling/ExternalsVisitor.php
+++ b/src/Hal/Metric/Class_/Coupling/ExternalsVisitor.php
@@ -1,4 +1,5 @@
 <?php
+
 namespace Hal\Metric\Class_\Coupling;
 
 use Hal\Metric\Helper\MetricClassNameGenerator;
@@ -14,7 +15,6 @@
  */
 class ExternalsVisitor extends NodeVisitorAbstract
 {
-
     /**
      * @var Metrics
      */
@@ -59,21 +59,21 @@ public function leaveNode(Node $node)
             // extends
             if (isset($node->extends)) {
                 if (is_array($node->extends)) {
-                    foreach ((array)$node->extends as $interface) {
-                        $this->pushToDependencies($dependencies, (string)$interface);
-                        array_push($parents, (string)$interface);
+                    foreach ((array) $node->extends as $interface) {
+                        $this->pushToDependencies($dependencies, (string) $interface);
+                        array_push($parents, (string) $interface);
                     }
                 } else {
-                    $this->pushToDependencies($dependencies, (string)$node->extends);
-                    array_push($parents, (string)$node->extends);
+                    $this->pushToDependencies($dependencies, (string) $node->extends);
+                    array_push($parents, (string) $node->extends);
                 }
             }
 
             // implements
             if (isset($node->implements)) {
                 foreach ($node->implements as $interface) {
-                    $this->pushToDependencies($dependencies, (string)$interface);
-                    array_push($interfaces, (string)$interface);
+                    $this->pushToDependencies($dependencies, (string) $interface);
+                    array_push($interfaces, (string) $interface);
                 }
             }
 
@@ -82,7 +82,7 @@ public function leaveNode(Node $node)
                     // return
                     if (isset($stmt->returnType)) {
                         if ($stmt->returnType instanceof Node\Name\FullyQualified) {
-                            $this->pushToDependencies($dependencies, (string)$stmt->returnType);
+                            $this->pushToDependencies($dependencies, (string) $stmt->returnType);
                         }
                     }
 
@@ -90,7 +90,7 @@ public function leaveNode(Node $node)
                     foreach ($stmt->params as $param) {
                         if ($param->type) {
                             if ($param->type instanceof Node\Name\FullyQualified) {
-                                $this->pushToDependencies($dependencies, (string)$param->type);
+                                $this->pushToDependencies($dependencies, (string) $param->type);
                             }
                         }
                     }
@@ -115,13 +115,13 @@ public function leaveNode(Node $node)
                         foreach ($matches[1] as $check) {
                             foreach ($this->uses as $use) {
                                 if (method_exists($use, 'getAlias')) {
-                                    if (((string)$use->getAlias()) === $check) {
-                                        $this->pushToDependencies($dependencies, (string)($use->name));
+                                    if (((string) $use->getAlias()) === $check) {
+                                        $this->pushToDependencies($dependencies, (string) ($use->name));
                                     }
                                     continue;
                                 }
                                 if ($use->alias === $check) {
-                                    $this->pushToDependencies($dependencies, (string)($use->name));
+                                    $this->pushToDependencies($dependencies, (string) ($use->name));
                                 }
                             }
                         }
@@ -141,6 +141,6 @@ private function pushToDependencies(array &$dependencies, $dependency)
         if ('self' === $lowercase || 'parent' === $lowercase) {
             return;
         }
-        array_push($dependencies, (string)$dependency);
+        array_push($dependencies, (string) $dependency);
     }
 }
diff --git a/src/Hal/Metric/Class_/Structural/LcomVisitor.php b/src/Hal/Metric/Class_/Structural/LcomVisitor.php
index c537ca7b..81b9a006 100644
--- a/src/Hal/Metric/Class_/Structural/LcomVisitor.php
+++ b/src/Hal/Metric/Class_/Structural/LcomVisitor.php
@@ -1,4 +1,5 @@
 <?php
+
 namespace Hal\Metric\Class_\Structural;
 
 use Hal\Component\Tree\GraphDeduplicated;
@@ -17,7 +18,6 @@
  */
 class LcomVisitor extends NodeVisitorAbstract
 {
-
     /**
      * @var Metrics
      */
diff --git a/src/Hal/Metric/Class_/Structural/SystemComplexityVisitor.php b/src/Hal/Metric/Class_/Structural/SystemComplexityVisitor.php
index e7aae6de..1796b3f3 100644
--- a/src/Hal/Metric/Class_/Structural/SystemComplexityVisitor.php
+++ b/src/Hal/Metric/Class_/Structural/SystemComplexityVisitor.php
@@ -1,4 +1,5 @@
 <?php
+
 namespace Hal\Metric\Class_\Structural;
 
 use Hal\Metric\Helper\MetricClassNameGenerator;
@@ -20,7 +21,6 @@
  */
 class SystemComplexityVisitor extends NodeVisitorAbstract
 {
-
     /**
      * @var Metrics
      */
diff --git a/src/Hal/Metric/Class_/Text/HalsteadVisitor.php b/src/Hal/Metric/Class_/Text/HalsteadVisitor.php
index f620f7a1..4cd0cab9 100644
--- a/src/Hal/Metric/Class_/Text/HalsteadVisitor.php
+++ b/src/Hal/Metric/Class_/Text/HalsteadVisitor.php
@@ -23,7 +23,6 @@
  */
 class HalsteadVisitor extends NodeVisitorAbstract
 {
-
     /**
      * @var Metrics
      */
@@ -44,10 +43,10 @@ public function leaveNode(Node $node)
     {
         if ($node instanceof Stmt\Class_ || $node instanceof Stmt\Function_ || $node instanceof Stmt\Trait_) {
             if ($node instanceof Stmt\Class_ || $node instanceof Stmt\Trait_) {
-                $name = (string)(isset($node->namespacedName) ? $node->namespacedName : 'anonymous@' . spl_object_hash($node));
+                $name = isset($node->namespacedName) ? (string) $node->namespacedName : 'anonymous@' . spl_object_hash($node);
                 $classOrFunction = $this->metrics->get($name);
             } else {
-                $classOrFunction = new FunctionMetric((string)$node->name);
+                $classOrFunction = new FunctionMetric((string) $node->name);
                 $this->metrics->attach($classOrFunction);
             }
 
diff --git a/src/Hal/Metric/Class_/Text/LengthVisitor.php b/src/Hal/Metric/Class_/Text/LengthVisitor.php
index e69c41f8..442a2888 100644
--- a/src/Hal/Metric/Class_/Text/LengthVisitor.php
+++ b/src/Hal/Metric/Class_/Text/LengthVisitor.php
@@ -1,4 +1,5 @@
 <?php
+
 namespace Hal\Metric\Class_\Text;
 
 use Hal\Metric\FunctionMetric;
@@ -13,7 +14,6 @@
  */
 class LengthVisitor extends NodeVisitorAbstract
 {
-
     /**
      * @var Metrics
      */
@@ -34,10 +34,10 @@ public function leaveNode(Node $node)
     {
         if ($node instanceof Stmt\Class_ || $node instanceof Stmt\Function_ || $node instanceof Stmt\Trait_) {
             if ($node instanceof Stmt\Class_ || $node instanceof Stmt\Trait_) {
-                $name = (string)(isset($node->namespacedName) ? $node->namespacedName : 'anonymous@' . spl_object_hash($node));
+                $name = isset($node->namespacedName) ? (string) $node->namespacedName : 'anonymous@' . spl_object_hash($node);
                 $classOrFunction = $this->metrics->get($name);
             } else {
-                $classOrFunction = new FunctionMetric((string)$node->name);
+                $classOrFunction = new FunctionMetric((string) $node->name);
                 $this->metrics->attach($classOrFunction);
             }
 
diff --git a/src/Hal/Metric/Consolidated.php b/src/Hal/Metric/Consolidated.php
index df3e9bd7..02b92c48 100644
--- a/src/Hal/Metric/Consolidated.php
+++ b/src/Hal/Metric/Consolidated.php
@@ -1,4 +1,5 @@
 <?php
+
 namespace Hal\Metric;
 
 use Hal\Violation\Violation;
@@ -66,13 +67,13 @@ public function __construct(Metrics $metrics)
         }
 
         // sums
-        $sum = (object)[
+        $sum = (object) [
             'loc' => 0,
             'cloc' => 0,
             'lloc' => 0,
             'nbMethods' => 0,
         ];
-        $avg = (object)[
+        $avg = (object) [
             'wmc' => [],
             'ccn' => [],
             'bugs' => [],
@@ -107,7 +108,7 @@ public function __construct(Metrics $metrics)
 
         foreach ($avg as &$a) {
             if (count($a) > 0) {
-                $a = round(array_sum((array)$a) / count($a), 2);
+                $a = round(array_sum((array) $a) / count($a), 2);
             } else {
                 $a = 0;
             }
@@ -166,7 +167,7 @@ public function __construct(Metrics $metrics)
                 $violations[$name]++;
             }
         }
-        $sum->violations = (object)$violations;
+        $sum->violations = (object) $violations;
 
         $this->avg = $avg;
         $this->sum = $sum;
diff --git a/src/Hal/Metric/FileMetric.php b/src/Hal/Metric/FileMetric.php
index c4414910..67494477 100644
--- a/src/Hal/Metric/FileMetric.php
+++ b/src/Hal/Metric/FileMetric.php
@@ -1,4 +1,5 @@
 <?php
+
 namespace Hal\Metric;
 
 class FileMetric implements Metric, \JsonSerializable
diff --git a/src/Hal/Metric/FunctionMetric.php b/src/Hal/Metric/FunctionMetric.php
index 9580d1e2..ba58a3b5 100644
--- a/src/Hal/Metric/FunctionMetric.php
+++ b/src/Hal/Metric/FunctionMetric.php
@@ -1,4 +1,5 @@
 <?php
+
 namespace Hal\Metric;
 
 class FunctionMetric implements Metric, \JsonSerializable
diff --git a/src/Hal/Metric/Helper/RoleOfMethodDetector.php b/src/Hal/Metric/Helper/RoleOfMethodDetector.php
index ed9633f4..10e00949 100644
--- a/src/Hal/Metric/Helper/RoleOfMethodDetector.php
+++ b/src/Hal/Metric/Helper/RoleOfMethodDetector.php
@@ -1,4 +1,5 @@
 <?php
+
 namespace Hal\Metric\Helper;
 
 use PhpParser\Node\Expr\Cast;
@@ -89,7 +90,7 @@ class RoleOfMethodDetector
                 'PhpParser\\Node\\Param',
                 'PhpParser\\Node\\Expr\\Variable',
             ],
-        ]
+        ],
     ];
 
     /**
diff --git a/src/Hal/Metric/InterfaceMetric.php b/src/Hal/Metric/InterfaceMetric.php
index 01534a96..425b3c48 100644
--- a/src/Hal/Metric/InterfaceMetric.php
+++ b/src/Hal/Metric/InterfaceMetric.php
@@ -1,7 +1,5 @@
 <?php
-namespace Hal\Metric;
 
-class InterfaceMetric extends ClassMetric
-{
+namespace Hal\Metric;
 
-}
+class InterfaceMetric extends ClassMetric {}
diff --git a/src/Hal/Metric/Metric.php b/src/Hal/Metric/Metric.php
index 92a1b328..29cbcafd 100644
--- a/src/Hal/Metric/Metric.php
+++ b/src/Hal/Metric/Metric.php
@@ -1,4 +1,5 @@
 <?php
+
 namespace Hal\Metric;
 
 /**
diff --git a/src/Hal/Metric/Metrics.php b/src/Hal/Metric/Metrics.php
index 62551abd..9440bb18 100644
--- a/src/Hal/Metric/Metrics.php
+++ b/src/Hal/Metric/Metrics.php
@@ -7,7 +7,6 @@
  */
 class Metrics implements \JsonSerializable
 {
-
     /**
      * @var array
      */
diff --git a/src/Hal/Metric/Package/PackageCollectingVisitor.php b/src/Hal/Metric/Package/PackageCollectingVisitor.php
index 6084c664..6bed5f0b 100644
--- a/src/Hal/Metric/Package/PackageCollectingVisitor.php
+++ b/src/Hal/Metric/Package/PackageCollectingVisitor.php
@@ -27,7 +27,7 @@ public function __construct(Metrics $metrics)
     public function enterNode(Node $node)
     {
         if ($node instanceof Namespace_) {
-            $this->namespace = (string)$node->name;
+            $this->namespace = (string) $node->name;
         }
     }
 
@@ -51,8 +51,8 @@ public function leaveNode(Node $node)
                 $this->metrics->attach($packageMetric);
             }
             /* @var PackageMetric $packageMetric */
-            $elementName = isset($node->namespacedName) ? $node->namespacedName : 'anonymous@' . spl_object_hash($node);
-            $elementName = (string)$elementName;
+            $elementName = isset($node->namespacedName) ? (string) $node->namespacedName : 'anonymous@' . spl_object_hash($node);
+            $elementName = (string) $elementName;
             $packageMetric->addClass($elementName);
 
             $this->metrics->get($elementName)->set('package', $packageName);
diff --git a/src/Hal/Metric/Package/PackageDistance.php b/src/Hal/Metric/Package/PackageDistance.php
index 34f7a823..54881c8b 100644
--- a/src/Hal/Metric/Package/PackageDistance.php
+++ b/src/Hal/Metric/Package/PackageDistance.php
@@ -1,4 +1,5 @@
 <?php
+
 namespace Hal\Metric\Package;
 
 use Hal\Metric\Metrics;
diff --git a/src/Hal/Metric/Package/PackageInstability.php b/src/Hal/Metric/Package/PackageInstability.php
index d2971f58..877df344 100644
--- a/src/Hal/Metric/Package/PackageInstability.php
+++ b/src/Hal/Metric/Package/PackageInstability.php
@@ -29,6 +29,7 @@ public function calculate(Metrics $metrics)
         // Set depending instabilities
         foreach ($packages as $eachPackage) {
             $dependentInstabilities = array_map(function ($packageName) use ($instabilitiesByPackage) {
+                //return $instabilitiesByPackage[$packageName] ?? null;
                 return isset($instabilitiesByPackage[$packageName]) ? $instabilitiesByPackage[$packageName] : null;
             }, $eachPackage->getOutgoingPackageDependencies());
             $dependentInstabilities = array_combine(
diff --git a/src/Hal/Metric/PackageMetric.php b/src/Hal/Metric/PackageMetric.php
index ebc2cfce..46e31b49 100644
--- a/src/Hal/Metric/PackageMetric.php
+++ b/src/Hal/Metric/PackageMetric.php
@@ -18,7 +18,7 @@ public function getClasses()
     public function addClass($name)
     {
         $elements = $this->get('classes');
-        $elements[] = (string)$name;
+        $elements[] = (string) $name;
         $this->set('classes', $elements);
     }
 
@@ -26,7 +26,7 @@ public function addClass($name)
     public function setAbstraction($abstraction)
     {
         if ($abstraction !== null) {
-            $abstraction = (float)$abstraction;
+            $abstraction = (float) $abstraction;
         }
         $this->set('abstraction', $abstraction);
     }
@@ -41,7 +41,7 @@ public function getAbstraction()
     public function setInstability($instability)
     {
         if ($instability !== null) {
-            $instability = (float)$instability;
+            $instability = (float) $instability;
         }
         $this->set('instability', $instability);
     }
diff --git a/src/Hal/Metric/ProjectMetric.php b/src/Hal/Metric/ProjectMetric.php
index 04ffde84..70cce4d3 100644
--- a/src/Hal/Metric/ProjectMetric.php
+++ b/src/Hal/Metric/ProjectMetric.php
@@ -1,4 +1,5 @@
 <?php
+
 namespace Hal\Metric;
 
 class ProjectMetric implements Metric, \JsonSerializable
diff --git a/src/Hal/Metric/Registry.php b/src/Hal/Metric/Registry.php
index be052372..457add50 100644
--- a/src/Hal/Metric/Registry.php
+++ b/src/Hal/Metric/Registry.php
@@ -51,9 +51,7 @@ class Registry
         'pageRank' => "PageRank for component",
     ];
 
-    public function allForProject()
-    {
-    }
+    public function allForProject() {}
 
     public function allForStructures()
     {
diff --git a/src/Hal/Metric/SearchMetric.php b/src/Hal/Metric/SearchMetric.php
index 1be1fdf5..5de228d9 100644
--- a/src/Hal/Metric/SearchMetric.php
+++ b/src/Hal/Metric/SearchMetric.php
@@ -1,4 +1,5 @@
 <?php
+
 namespace Hal\Metric;
 
 class SearchMetric implements Metric, \JsonSerializable
diff --git a/src/Hal/Metric/System/Changes/GitChanges.php b/src/Hal/Metric/System/Changes/GitChanges.php
index 1a1378b6..7aa04979 100644
--- a/src/Hal/Metric/System/Changes/GitChanges.php
+++ b/src/Hal/Metric/System/Changes/GitChanges.php
@@ -1,4 +1,5 @@
 <?php
+
 namespace Hal\Metric\System\Changes;
 
 use Hal\Application\Config\Config;
@@ -9,7 +10,6 @@
 
 class GitChanges
 {
-
     /**
      * @var array
      */
diff --git a/src/Hal/Metric/System/Coupling/Coupling.php b/src/Hal/Metric/System/Coupling/Coupling.php
index f6e713c5..e649fc57 100644
--- a/src/Hal/Metric/System/Coupling/Coupling.php
+++ b/src/Hal/Metric/System/Coupling/Coupling.php
@@ -14,7 +14,6 @@
  */
 class Coupling
 {
-
     /**
      * @param Metrics $metrics
      */
diff --git a/src/Hal/Metric/System/Coupling/DepthOfInheritanceTree.php b/src/Hal/Metric/System/Coupling/DepthOfInheritanceTree.php
index 5be83493..45914d18 100644
--- a/src/Hal/Metric/System/Coupling/DepthOfInheritanceTree.php
+++ b/src/Hal/Metric/System/Coupling/DepthOfInheritanceTree.php
@@ -17,7 +17,6 @@
  */
 class DepthOfInheritanceTree
 {
-
     /**
      * @param Metrics $metrics
      */
diff --git a/src/Hal/Metric/System/Coupling/PageRank.php b/src/Hal/Metric/System/Coupling/PageRank.php
index b08b934b..71b39971 100644
--- a/src/Hal/Metric/System/Coupling/PageRank.php
+++ b/src/Hal/Metric/System/Coupling/PageRank.php
@@ -10,7 +10,6 @@
  */
 class PageRank
 {
-
     /**
      * @param Metrics $metrics
      */
diff --git a/src/Hal/Metric/System/Packages/Composer/Composer.php b/src/Hal/Metric/System/Packages/Composer/Composer.php
index c8917c52..2bece5e5 100644
--- a/src/Hal/Metric/System/Packages/Composer/Composer.php
+++ b/src/Hal/Metric/System/Packages/Composer/Composer.php
@@ -13,7 +13,6 @@
  */
 class Composer
 {
-
     /**
      * @var Config
      */
@@ -89,13 +88,13 @@ protected function getComposerJsonRequirements()
             if (!\preg_match('/composer(-dist)?\.json/', $filename)) {
                 continue;
             }
-            $composerJson = (object)\json_decode(\file_get_contents($filename));
+            $composerJson = (object) \json_decode(\file_get_contents($filename));
 
             if (!isset($composerJson->require)) {
                 continue;
             }
 
-            $rawRequirements[] = (array)$composerJson->require;
+            $rawRequirements[] = (array) $composerJson->require;
         }
 
         return \call_user_func_array('array_merge', $rawRequirements);
@@ -122,7 +121,7 @@ protected function getComposerLockInstalled($rootPackageRequirements)
             if (false === \strpos($filename, 'composer.lock')) {
                 continue;
             }
-            $composerLockJson = (object)\json_decode(\file_get_contents($filename));
+            $composerLockJson = (object) \json_decode(\file_get_contents($filename));
 
             if (!isset($composerLockJson->packages)) {
                 continue;
diff --git a/src/Hal/Metric/System/Packages/Composer/Packagist.php b/src/Hal/Metric/System/Packages/Composer/Packagist.php
index 3c130361..2880f30e 100644
--- a/src/Hal/Metric/System/Packages/Composer/Packagist.php
+++ b/src/Hal/Metric/System/Packages/Composer/Packagist.php
@@ -1,4 +1,5 @@
 <?php
+
 namespace Hal\Metric\System\Packages\Composer;
 
 /**
@@ -6,14 +7,13 @@
  */
 class Packagist
 {
-
     /**
      * @param $package
      * @return \StdClass
      */
     public function get($package)
     {
-        $response = new \StdClass;
+        $response = new \StdClass();
         $response->latest = null;
         $response->license = [];
         $response->homepage = null;
@@ -56,7 +56,7 @@ public function get($package)
 
         // get latest version
         $latest = '0.0.0';
-        foreach ((array)$json->package->versions as $version => $datas) {
+        foreach ((array) $json->package->versions as $version => $datas) {
             if ($version[0] === 'v') {
                 $version = substr($version, 1);
             }
@@ -67,7 +67,7 @@ public function get($package)
                 $latest = $version;
                 $response->name = $package;
                 $response->latest = $version;
-                $response->license = (array)$datas->license;
+                $response->license = (array) $datas->license;
                 $response->homepage = $datas->homepage;
                 $response->time = $datas->time;
                 $response->zip = $datas->dist->url;
diff --git a/src/Hal/Metric/System/UnitTesting/UnitTesting.php b/src/Hal/Metric/System/UnitTesting/UnitTesting.php
index fcfd1681..a90398d2 100644
--- a/src/Hal/Metric/System/UnitTesting/UnitTesting.php
+++ b/src/Hal/Metric/System/UnitTesting/UnitTesting.php
@@ -1,4 +1,5 @@
 <?php
+
 namespace Hal\Metric\System\UnitTesting;
 
 use Hal\Application\Config\Config;
@@ -12,7 +13,6 @@
 
 class UnitTesting
 {
-
     /**
      * @var array
      */
@@ -69,7 +69,7 @@ public function calculate(Metrics $metrics)
 
         // JUNIT format
         foreach ($xpath->query('//testsuite[@file]') as $suite) {
-            array_push($testsuites, (object)[
+            array_push($testsuites, (object) [
                 'file' => $suite->getAttribute('file'),
                 'name' => $suite->getAttribute('name'),
                 'assertions' => $suite->getAttribute('assertions'),
@@ -98,7 +98,7 @@ public function calculate(Metrics $metrics)
                 $assertions = $case === $suite->firstChild->nextSibling ? $suite->getAttribute('assertions') : 0;
             }
 
-            $testsuites[$case->getAttribute('class')] = (object)[
+            $testsuites[$case->getAttribute('class')] = (object) [
                 'file' => $case->getAttribute('file'),
                 'name' => $case->getAttribute('class'),
                 'assertions' => $assertions,
@@ -130,10 +130,10 @@ public function calculate(Metrics $metrics)
 
             // list of externals sources of unit test
             $metric = $metricsOfUnitTest->get($suite->name);
-            $externals = (array)$metric->get('externals');
+            $externals = (array) $metric->get('externals');
 
             // global stats for each test
-            $infoAboutTests[$suite->name] = (object)[
+            $infoAboutTests[$suite->name] = (object) [
                 'nbExternals' => count(array_unique($externals)),
                 'externals' => array_unique($externals),
                 'filename' => $suite->file,
diff --git a/src/Hal/Report/Cli/Reporter.php b/src/Hal/Report/Cli/Reporter.php
index 4a512ab1..d8e3f57a 100644
--- a/src/Hal/Report/Cli/Reporter.php
+++ b/src/Hal/Report/Cli/Reporter.php
@@ -1,4 +1,5 @@
 <?php
+
 namespace Hal\Report\Cli;
 
 use Hal\Application\Config\Config;
@@ -8,7 +9,6 @@
 
 class Reporter
 {
-
     /**
      * @var Config
      */
diff --git a/src/Hal/Report/Cli/SearchReporter.php b/src/Hal/Report/Cli/SearchReporter.php
index 9af1c566..ceb688b7 100644
--- a/src/Hal/Report/Cli/SearchReporter.php
+++ b/src/Hal/Report/Cli/SearchReporter.php
@@ -63,7 +63,7 @@ private function displayCliReport($searchName, array $foundSearch)
         );
 
         $config = $this->config->get('searches')->get($searchName)->getConfig();
-        if(!empty($foundSearch) && !empty($config->failIfFound) && true === $config->failIfFound) {
+        if (!empty($foundSearch) && !empty($config->failIfFound) && true === $config->failIfFound) {
             $title = sprintf(
                 '<error>[ERR] Found %d occurrences for search "%s"</error>',
                 sizeof($foundSearch),
diff --git a/src/Hal/Report/Cli/SummaryWriter.php b/src/Hal/Report/Cli/SummaryWriter.php
index 4f76ccbf..c3e204f8 100644
--- a/src/Hal/Report/Cli/SummaryWriter.php
+++ b/src/Hal/Report/Cli/SummaryWriter.php
@@ -9,50 +9,50 @@ class SummaryWriter extends SummaryProvider
     public function getReport()
     {
         $out = <<<EOT
-LOC
-    Lines of code                               {$this->sum->loc}
-    Logical lines of code                       {$this->sum->lloc}
-    Comment lines of code                       {$this->sum->cloc}
-    Average volume                              {$this->avg->volume}
-    Average comment weight                      {$this->avg->commentWeight}
-    Average intelligent content                 {$this->avg->commentWeight}
-    Logical lines of code by class              {$this->locByClass}
-    Logical lines of code by method             {$this->locByMethod}
-Object oriented programming
-    Classes                                     {$this->sum->nbClasses}
-    Interface                                   {$this->sum->nbInterfaces}
-    Methods                                     {$this->sum->nbMethods}
-    Methods by class                            {$this->methodsByClass}
-    Lack of cohesion of methods                 {$this->avg->lcom}
+            LOC
+                Lines of code                               {$this->sum->loc}
+                Logical lines of code                       {$this->sum->lloc}
+                Comment lines of code                       {$this->sum->cloc}
+                Average volume                              {$this->avg->volume}
+                Average comment weight                      {$this->avg->commentWeight}
+                Average intelligent content                 {$this->avg->commentWeight}
+                Logical lines of code by class              {$this->locByClass}
+                Logical lines of code by method             {$this->locByMethod}
+            Object oriented programming
+                Classes                                     {$this->sum->nbClasses}
+                Interface                                   {$this->sum->nbInterfaces}
+                Methods                                     {$this->sum->nbMethods}
+                Methods by class                            {$this->methodsByClass}
+                Lack of cohesion of methods                 {$this->avg->lcom}
 
-Coupling
-    Average afferent coupling                   {$this->avg->afferentCoupling}
-    Average efferent coupling                   {$this->avg->efferentCoupling}
-    Average instability                         {$this->avg->instability}
-    Depth of Inheritance Tree                   {$this->treeInheritenceDepth}
+            Coupling
+                Average afferent coupling                   {$this->avg->afferentCoupling}
+                Average efferent coupling                   {$this->avg->efferentCoupling}
+                Average instability                         {$this->avg->instability}
+                Depth of Inheritance Tree                   {$this->treeInheritenceDepth}
 
-Package
-    Packages                                    {$this->sum->nbPackages}
-    Average classes per package                 {$this->avg->classesPerPackage}
-    Average distance                            {$this->avg->distance}
-    Average incoming class dependencies         {$this->avg->incomingCDep}
-    Average outgoing class dependencies         {$this->avg->outgoingCDep}
-    Average incoming package dependencies       {$this->avg->incomingPDep}
-    Average outgoing package dependencies       {$this->avg->outgoingPDep}
-Complexity
-    Average Cyclomatic complexity by class      {$this->avg->ccn}
-    Average Weighted method count by class      {$this->avg->wmc}
-    Average Relative system complexity          {$this->avg->relativeSystemComplexity}
-    Average Difficulty                          {$this->avg->difficulty}
+            Package
+                Packages                                    {$this->sum->nbPackages}
+                Average classes per package                 {$this->avg->classesPerPackage}
+                Average distance                            {$this->avg->distance}
+                Average incoming class dependencies         {$this->avg->incomingCDep}
+                Average outgoing class dependencies         {$this->avg->outgoingCDep}
+                Average incoming package dependencies       {$this->avg->incomingPDep}
+                Average outgoing package dependencies       {$this->avg->outgoingPDep}
+            Complexity
+                Average Cyclomatic complexity by class      {$this->avg->ccn}
+                Average Weighted method count by class      {$this->avg->wmc}
+                Average Relative system complexity          {$this->avg->relativeSystemComplexity}
+                Average Difficulty                          {$this->avg->difficulty}
 
-Bugs
-    Average bugs by class                       {$this->avg->bugs}
-    Average defects by class (Kan)              {$this->avg->kanDefect}
-Violations
-    Critical                                    {$this->sum->violations->critical}
-    Error                                       {$this->sum->violations->error}
-    Warning                                     {$this->sum->violations->warning}
-    Information                                 {$this->sum->violations->information}
+            Bugs
+                Average bugs by class                       {$this->avg->bugs}
+                Average defects by class (Kan)              {$this->avg->kanDefect}
+            Violations
+                Critical                                    {$this->sum->violations->critical}
+                Error                                       {$this->sum->violations->error}
+                Warning                                     {$this->sum->violations->warning}
+                Information                                 {$this->sum->violations->information}
 EOT;
 
         // git
@@ -78,10 +78,10 @@ public function getReport()
         if ($this->config->has('junit')) {
             $out .= <<<EOT
 
-Unit testing
-    Number of unit tests                        {$this->metrics->get('unitTesting')->get('nbSuites')}
-    Classes called by tests                     {$this->metrics->get('unitTesting')->get('nbCoveredClasses')}
-    Classes called by tests (percent)           {$this->metrics->get('unitTesting')->get('percentCoveredClasses')} %
+                Unit testing
+                    Number of unit tests                        {$this->metrics->get('unitTesting')->get('nbSuites')}
+                    Classes called by tests                     {$this->metrics->get('unitTesting')->get('nbCoveredClasses')}
+                    Classes called by tests (percent)           {$this->metrics->get('unitTesting')->get('percentCoveredClasses')} %
 EOT;
         }
 
diff --git a/src/Hal/Report/Csv/Reporter.php b/src/Hal/Report/Csv/Reporter.php
index a09fa3e7..2e9ba022 100644
--- a/src/Hal/Report/Csv/Reporter.php
+++ b/src/Hal/Report/Csv/Reporter.php
@@ -1,4 +1,5 @@
 <?php
+
 namespace Hal\Report\Csv;
 
 use Hal\Application\Config\Config;
diff --git a/src/Hal/Report/Html/Reporter.php b/src/Hal/Report/Html/Reporter.php
index 001f1f07..6304d8c2 100644
--- a/src/Hal/Report/Html/Reporter.php
+++ b/src/Hal/Report/Html/Reporter.php
@@ -79,9 +79,9 @@ public function generate(Metrics $metrics)
         $consolidated = new Consolidated($metrics);
 
         // history of builds
-        $today = (object)[
+        $today = (object) [
             'avg' => $consolidated->getAvg(),
-            'sum' => $consolidated->getSum()
+            'sum' => $consolidated->getSum(),
         ];
         $files = glob($logDir . '/js/history-*.json');
         $next = count($files) + 1;
@@ -252,7 +252,7 @@ protected function getTrend($type, $key, $lowIsBetter = false, $highIsBetter = f
         }
 
         $oldValue = $last->$type->$key;
-        $newValue = isset($this->$type->$key) ? $this->$type->$key : 0;
+        $newValue = isset($this->sum->$type->$key) ? $this->sum->$type->$key : 0;
         if ($newValue > $oldValue) {
             $r = 'gt';
         } elseif ($newValue < $oldValue) {
diff --git a/src/Hal/Report/Json/Reporter.php b/src/Hal/Report/Json/Reporter.php
index 49e13b0c..35637c4c 100644
--- a/src/Hal/Report/Json/Reporter.php
+++ b/src/Hal/Report/Json/Reporter.php
@@ -1,4 +1,5 @@
 <?php
+
 namespace Hal\Report\Json;
 
 use Hal\Application\Config\Config;
@@ -7,7 +8,6 @@
 
 class Reporter
 {
-
     /**
      * @var Config
      */
diff --git a/src/Hal/Report/Json/SummaryWriter.php b/src/Hal/Report/Json/SummaryWriter.php
index 3dfebdb0..993320c4 100644
--- a/src/Hal/Report/Json/SummaryWriter.php
+++ b/src/Hal/Report/Json/SummaryWriter.php
@@ -56,7 +56,7 @@ public function getReport()
                 'error' => $this->sum->violations->error,
                 'warning' => $this->sum->violations->warning,
                 'information' => $this->sum->violations->information,
-            ]
+            ],
         ];
     }
 }
diff --git a/src/Hal/Report/Violations/Xml/Reporter.php b/src/Hal/Report/Violations/Xml/Reporter.php
index 9cf57b8d..11682dd4 100644
--- a/src/Hal/Report/Violations/Xml/Reporter.php
+++ b/src/Hal/Report/Violations/Xml/Reporter.php
@@ -1,4 +1,5 @@
 <?php
+
 namespace Hal\Report\Violations\Xml;
 
 use Hal\Application\Config\Config;
@@ -8,7 +9,6 @@
 
 class Reporter
 {
-
     /**
      * @var Config
      */
@@ -32,7 +32,7 @@ public function __construct(Config $config, Output $output)
 
     public function generate(Metrics $metrics)
     {
-        if(!class_exists('\DOMDocument')) {
+        if (!class_exists('\DOMDocument')) {
             $this->output->writeln('<error>The DOM extension is not available. Please install it if you want to use the Xml Violations report.</error>');
             return;
         }
diff --git a/src/Hal/Search/Search.php b/src/Hal/Search/Search.php
index 0cec8f6d..dec71bd7 100644
--- a/src/Hal/Search/Search.php
+++ b/src/Hal/Search/Search.php
@@ -26,7 +26,7 @@ class Search
     public function __construct($name, array $config)
     {
         $this->name = $name;
-        $this->config = (object)$config;
+        $this->config = (object) $config;
     }
 
     /**
@@ -47,7 +47,7 @@ public function getConfig()
 
     public function matches(Metric $metric)
     {
-        $configAsArray = (array)$this->config;
+        $configAsArray = (array) $this->config;
 
         if (!empty($this->config->type)) {
             // Does the search concerns type ?
@@ -125,7 +125,7 @@ private function matchInstanceOf(Metric $metric, $instanceOf)
     {
         foreach ($instanceOf as $expectedInterface) {
             $expectedInterface = ltrim($expectedInterface, '\\');
-            if (!in_array($expectedInterface, (array)$metric->get('implements'))) {
+            if (!in_array($expectedInterface, (array) $metric->get('implements'))) {
                 return false;
             }
         }
@@ -136,7 +136,7 @@ private function matchInstanceOf(Metric $metric, $instanceOf)
     private function usesClasses(Metric $metric, $usesClasses)
     {
         foreach ($usesClasses as $expectedClass) {
-            foreach ((array)$metric->get('externals') as $use) {
+            foreach ((array) $metric->get('externals') as $use) {
                 if (preg_match('@' . $expectedClass . '@i', $use)) {
                     return true;
                 }
diff --git a/src/Hal/Search/Searches.php b/src/Hal/Search/Searches.php
index 86aa4692..817ecc9e 100644
--- a/src/Hal/Search/Searches.php
+++ b/src/Hal/Search/Searches.php
@@ -4,7 +4,6 @@
 
 class Searches
 {
-
     /**
      * @var array
      */
diff --git a/src/Hal/Search/SearchesValidator.php b/src/Hal/Search/SearchesValidator.php
index 38f526fd..f7014623 100644
--- a/src/Hal/Search/SearchesValidator.php
+++ b/src/Hal/Search/SearchesValidator.php
@@ -17,12 +17,12 @@ public function validates(Searches $searches)
                 'nameMatches',
                 'instanceOf',
                 'usesClasses',
-                'failIfFound'
+                'failIfFound',
             ];
             $registry = new Registry();
             $allowedKeys = array_merge($allowedKeys, $registry->allForStructures());
 
-            $diff = array_diff(array_keys((array)$config), $allowedKeys);
+            $diff = array_diff(array_keys((array) $config), $allowedKeys);
             if (count($diff) > 0) {
                 throw new ConfigException(
                     sprintf(
diff --git a/src/Hal/Violation/Class_/Blob.php b/src/Hal/Violation/Class_/Blob.php
index de91e619..b90f0bdf 100644
--- a/src/Hal/Violation/Class_/Blob.php
+++ b/src/Hal/Violation/Class_/Blob.php
@@ -1,4 +1,5 @@
 <?php
+
 namespace Hal\Violation\Class_;
 
 use Hal\Metric\ClassMetric;
@@ -7,7 +8,6 @@
 
 class Blob implements Violation
 {
-
     /**
      * @inheritdoc
      */
@@ -59,13 +59,13 @@ public function getLevel()
     public function getDescription()
     {
         return <<<EOT
-A blob object (or "god class") does not follow the Single responsibility principle.
+            A blob object (or "god class") does not follow the Single responsibility principle.
 
-* object has lot of public methods  ({$this->metric->get('nbMethodsPublic')}, excluding getters and setters)
-* object has a high Lack of cohesion of methods (LCOM={$this->metric->get('lcom')})
-* object knows everything (and use lot of external classes)
+            * object has lot of public methods  ({$this->metric->get('nbMethodsPublic')}, excluding getters and setters)
+            * object has a high Lack of cohesion of methods (LCOM={$this->metric->get('lcom')})
+            * object knows everything (and use lot of external classes)
 
-Maybe you should reducing the number of methods splitting this object in many sub objects.
+            Maybe you should reducing the number of methods splitting this object in many sub objects.
 EOT;
     }
 }
diff --git a/src/Hal/Violation/Class_/ProbablyBugged.php b/src/Hal/Violation/Class_/ProbablyBugged.php
index c0472de8..1b12fa26 100644
--- a/src/Hal/Violation/Class_/ProbablyBugged.php
+++ b/src/Hal/Violation/Class_/ProbablyBugged.php
@@ -1,4 +1,5 @@
 <?php
+
 namespace Hal\Violation\Class_;
 
 use Hal\Metric\ClassMetric;
@@ -7,7 +8,6 @@
 
 class ProbablyBugged implements Violation
 {
-
     /**
      * @inheritdoc
      */
@@ -48,13 +48,13 @@ public function getLevel()
     public function getDescription()
     {
         return <<<EOT
-This component contains in theory {$this->metric->get('bugs')} bugs.
+            This component contains in theory {$this->metric->get('bugs')} bugs.
 
-* Calculation is based on number of operators, operands, cyclomatic complexity
-* See more details at https://en.wikipedia.org/wiki/Halstead_complexity_measures
-* {$this->metric->get('numberOfUnitTests')} testsuites has dependency to this class.
+            * Calculation is based on number of operators, operands, cyclomatic complexity
+            * See more details at https://en.wikipedia.org/wiki/Halstead_complexity_measures
+            * {$this->metric->get('numberOfUnitTests')} testsuites has dependency to this class.
 
-Maybe you should check your unit tests for this class.
+            Maybe you should check your unit tests for this class.
 EOT;
     }
 }
diff --git a/src/Hal/Violation/Class_/TooComplexClassCode.php b/src/Hal/Violation/Class_/TooComplexClassCode.php
index 1e697ad1..d772b003 100644
--- a/src/Hal/Violation/Class_/TooComplexClassCode.php
+++ b/src/Hal/Violation/Class_/TooComplexClassCode.php
@@ -1,4 +1,5 @@
 <?php
+
 namespace Hal\Violation\Class_;
 
 use Hal\Metric\ClassMetric;
@@ -42,12 +43,12 @@ public function getLevel()
     public function getDescription()
     {
         return <<<EOT
-This class looks really complex.
+            This class looks really complex.
 
-* Algorithms are complex (Total cyclomatic complexity of class is {$this->metric->get('ccn')})
-* Component uses {$this->metric->get('number_operators')} operators
+            * Algorithms are complex (Total cyclomatic complexity of class is {$this->metric->get('ccn')})
+            * Component uses {$this->metric->get('number_operators')} operators
 
-Maybe you should delegate some code to other objects.
+            Maybe you should delegate some code to other objects.
 EOT;
     }
 }
diff --git a/src/Hal/Violation/Class_/TooComplexMethodCode.php b/src/Hal/Violation/Class_/TooComplexMethodCode.php
index 8e111c7a..38e9274b 100644
--- a/src/Hal/Violation/Class_/TooComplexMethodCode.php
+++ b/src/Hal/Violation/Class_/TooComplexMethodCode.php
@@ -1,4 +1,5 @@
 <?php
+
 namespace Hal\Violation\Class_;
 
 use Hal\Metric\ClassMetric;
@@ -45,11 +46,11 @@ public function getLevel()
     public function getDescription()
     {
         return <<<EOT
-This class looks really complex.
+            This class looks really complex.
 
-* Algorithms are complex (Max cyclomatic complexity of class methods is {$this->metric->get('ccnMethodMax')})
+            * Algorithms are complex (Max cyclomatic complexity of class methods is {$this->metric->get('ccnMethodMax')})
 
-Maybe you should delegate some code to other objects or split complex method.
+            Maybe you should delegate some code to other objects or split complex method.
 EOT;
     }
 }
diff --git a/src/Hal/Violation/Class_/TooDependent.php b/src/Hal/Violation/Class_/TooDependent.php
index a727346a..60d3fbfb 100644
--- a/src/Hal/Violation/Class_/TooDependent.php
+++ b/src/Hal/Violation/Class_/TooDependent.php
@@ -1,4 +1,5 @@
 <?php
+
 namespace Hal\Violation\Class_;
 
 use Hal\Metric\ClassMetric;
@@ -7,7 +8,6 @@
 
 class TooDependent implements Violation
 {
-
     /**
      * @inheritdoc
      */
@@ -47,11 +47,11 @@ public function getLevel()
     public function getDescription()
     {
         return <<<EOT
-This class looks use really high number of components.
+            This class looks use really high number of components.
 
-* Efferent coupling is {$this->metric->get('efferentCoupling')}, so this class uses {$this->metric->get('efferentCoupling')} different external components.
+            * Efferent coupling is {$this->metric->get('efferentCoupling')}, so this class uses {$this->metric->get('efferentCoupling')} different external components.
 
-Maybe you should check why this class has lot of dependencies.
+            Maybe you should check why this class has lot of dependencies.
 EOT;
     }
 }
diff --git a/src/Hal/Violation/Class_/TooLong.php b/src/Hal/Violation/Class_/TooLong.php
index 1c7b6da3..7d3ef77a 100644
--- a/src/Hal/Violation/Class_/TooLong.php
+++ b/src/Hal/Violation/Class_/TooLong.php
@@ -1,4 +1,5 @@
 <?php
+
 namespace Hal\Violation\Class_;
 
 use Hal\Metric\ClassMetric;
@@ -7,7 +8,6 @@
 
 class TooLong implements Violation
 {
-
     /**
      * @inheritdoc
      */
@@ -46,12 +46,12 @@ public function getLevel()
     public function getDescription()
     {
         return <<<EOT
-This class looks really long.
+            This class looks really long.
 
-* Class has {$this->metric->get('lloc')} logical lines of code
-* Class has {$this->metric->get('loc')} lines of code
+            * Class has {$this->metric->get('lloc')} logical lines of code
+            * Class has {$this->metric->get('loc')} lines of code
 
-Maybe your class should not exceed 200 lines of logical code
+            Maybe your class should not exceed 200 lines of logical code
 EOT;
     }
 }
diff --git a/src/Hal/Violation/Package/StableAbstractionsPrinciple.php b/src/Hal/Violation/Package/StableAbstractionsPrinciple.php
index c8ad81b4..c5894b11 100644
--- a/src/Hal/Violation/Package/StableAbstractionsPrinciple.php
+++ b/src/Hal/Violation/Package/StableAbstractionsPrinciple.php
@@ -21,7 +21,7 @@ public function apply(Metric $metric)
         if (! $metric instanceof PackageMetric) {
             return;
         }
-        if (abs($metric->getDistance()) > sqrt(2)/4) {
+        if (abs($metric->getDistance()) > sqrt(2) / 4) {
             $this->metric = $metric;
             $metric->get('violations')->add($this);
         }
@@ -39,9 +39,9 @@ public function getDescription()
             : 'stable and concrete';
 
         return <<<EOT
-Packages should be either abstract and stable or concrete and instable.
+            Packages should be either abstract and stable or concrete and instable.
 
-This package is {$violation}.
+            This package is {$violation}.
 EOT;
     }
 }
diff --git a/src/Hal/Violation/Package/StableDependenciesPrinciple.php b/src/Hal/Violation/Package/StableDependenciesPrinciple.php
index 67e72f26..789d5b1c 100644
--- a/src/Hal/Violation/Package/StableDependenciesPrinciple.php
+++ b/src/Hal/Violation/Package/StableDependenciesPrinciple.php
@@ -53,12 +53,12 @@ public function getDescription()
             return "$name ($instability)";
         }, array_keys($this->violatingInstabilities), $this->violatingInstabilities));
         return <<<EOT
-Packages should depend in the direction of stability.
+            Packages should depend in the direction of stability.
 
-This package is more stable ({$thisInstability}) than {$count} package(s) that it depends on.
-The packages that are more stable are
+            This package is more stable ({$thisInstability}) than {$count} package(s) that it depends on.
+            The packages that are more stable are
 
-* {$packages}
+            * {$packages}
 EOT;
     }
 }
diff --git a/src/Hal/Violation/Search/SearchShouldNotBeFoundPrinciple.php b/src/Hal/Violation/Search/SearchShouldNotBeFoundPrinciple.php
index 311f9aee..a6a84cc5 100644
--- a/src/Hal/Violation/Search/SearchShouldNotBeFoundPrinciple.php
+++ b/src/Hal/Violation/Search/SearchShouldNotBeFoundPrinciple.php
@@ -7,7 +7,6 @@
 
 class SearchShouldNotBeFoundPrinciple implements Violation
 {
-
     private $concernedSearches = [];
 
     public function getName()
diff --git a/src/Hal/Violation/Violation.php b/src/Hal/Violation/Violation.php
index f787da7e..d5935d85 100644
--- a/src/Hal/Violation/Violation.php
+++ b/src/Hal/Violation/Violation.php
@@ -1,4 +1,5 @@
 <?php
+
 namespace Hal\Violation;
 
 use Hal\Metric\Metric;
diff --git a/src/Hal/Violation/ViolationParser.php b/src/Hal/Violation/ViolationParser.php
index d7c1b03a..0ccc049d 100644
--- a/src/Hal/Violation/ViolationParser.php
+++ b/src/Hal/Violation/ViolationParser.php
@@ -9,7 +9,6 @@
 
 class ViolationParser
 {
-
     /**
      * @param Metrics $metrics
      * @return $this
@@ -29,7 +28,7 @@ public function apply(Metrics $metrics)
         ];
 
         foreach ($metrics->all() as $metric) {
-            $metric->set('violations', new Violations);
+            $metric->set('violations', new Violations());
 
             foreach ($violations as $violation) {
                 $violation->apply($metric);
diff --git a/src/Hal/Violation/Violations.php b/src/Hal/Violation/Violations.php
index 70a1502a..91ae0193 100644
--- a/src/Hal/Violation/Violations.php
+++ b/src/Hal/Violation/Violations.php
@@ -1,4 +1,5 @@
 <?php
+
 namespace Hal\Violation;
 
 /**
diff --git a/src/functions.php b/src/functions.php
index 90eb5094..5281bc26 100644
--- a/src/functions.php
+++ b/src/functions.php
@@ -2,7 +2,6 @@
 
 class MyVisitor extends \PhpParser\NodeVisitorAbstract
 {
-
     /**
      * @var
      */
@@ -86,7 +85,7 @@ function getNameOfNode($node)
     }
 
     if ($node instanceof \PhpParser\Node\Name\FullyQualified) {
-        return (string)$node;
+        return (string) $node;
     }
     if ($node instanceof \PhpParser\Node\Expr\New_) {
         return getNameOfNode($node->class);
@@ -97,7 +96,7 @@ function getNameOfNode($node)
     }
 
     if ($node instanceof \PhpParser\Node\Name) {
-        return (string)implode($node->parts);
+        return (string) implode($node->parts);
     }
 
     if (isset($node->name) && $node->name instanceof \PhpParser\Node\Expr\Variable) {
@@ -129,7 +128,7 @@ function getNameOfNode($node)
     }
 
     if (isset($node->name)) {
-        return (string)$node->name;
+        return (string) $node->name;
     }
 
     return null;
@@ -175,16 +174,16 @@ function gradientAlphaFor($array, $attribute, $currentValue)
 {
     // memory cache
     static $caches;
-    if(null === $caches) {
+    if (null === $caches) {
         $caches = [];
     }
 
-    if(!isset($caches[$attribute])) {
+    if (!isset($caches[$attribute])) {
         // avoid to iterate over array too many times
         $max = 0;
         $min = 1;
-        foreach($array as $item) {
-            if(!isset($item[$attribute])) {
+        foreach ($array as $item) {
+            if (!isset($item[$attribute])) {
                 continue;
             }
 
@@ -211,7 +210,8 @@ function gradientAlphaFor($array, $attribute, $currentValue)
  * @param mixed $currentValue
  * @return string
  */
-function gradientStyleFor($array, $attribute, $currentValue) {
+function gradientStyleFor($array, $attribute, $currentValue)
+{
     return sprintf(' style="background-color: hsla(203, 82%%, 76%%, %s);"', gradientAlphaFor($array, $attribute, $currentValue));
 }
 
diff --git a/tests/Application/Config/File/ConfigFileReaderTest.php b/tests/Application/Config/File/ConfigFileReaderTest.php
index 2dc8fa04..e843d766 100644
--- a/tests/Application/Config/File/ConfigFileReaderTest.php
+++ b/tests/Application/Config/File/ConfigFileReaderTest.php
@@ -11,7 +11,7 @@
  */
 class ConfigFileReaderTest extends \PHPUnit\Framework\TestCase
 {
-    public function testICanParseBasicJsonFIle()
+    public function testICanParseBasicJsonFIle(): void
     {
         $filename = __DIR__ . '/examples/config.json';
 
@@ -55,7 +55,7 @@ private function getExpectedData()
         ];
     }
 
-    public function testICanParseConfigWithSearch()
+    public function testICanParseConfigWithSearch(): void
     {
         $filename = __DIR__ . '/examples/config-with-search.json';
 
diff --git a/tests/Application/Config/ParserTest.php b/tests/Application/Config/ParserTest.php
index 62a57d20..ac630442 100644
--- a/tests/Application/Config/ParserTest.php
+++ b/tests/Application/Config/ParserTest.php
@@ -12,14 +12,14 @@ class ParserTest extends \PHPUnit\Framework\TestCase
     /**
      * @dataProvider providesExample
      */
-    public function testICanParseArguments($argv, $expected)
+    public function testICanParseArguments($argv, $expected): void
     {
         $parser = new Parser();
         $config = $parser->parse($argv);
         $this->assertEquals($expected, $config->all());
     }
 
-    public function providesExample()
+    public static function providesExample()
     {
         return [
             [
diff --git a/tests/Component/Ast/NodeTraverserTest.php b/tests/Component/Ast/NodeTraverserTest.php
index 1593285f..601db156 100644
--- a/tests/Component/Ast/NodeTraverserTest.php
+++ b/tests/Component/Ast/NodeTraverserTest.php
@@ -7,7 +7,7 @@
 
 class NodeTraverserTest extends TestCase
 {
-    public function testItCanBeInstantiated()
+    public function testItCanBeInstantiated(): void
     {
         $this->assertInstanceOf(BaseTraverser::class, new NodeTraverser());
     }
diff --git a/tests/Component/File/FinderTest.php b/tests/Component/File/FinderTest.php
index 3e1a6590..ae971b0b 100644
--- a/tests/Component/File/FinderTest.php
+++ b/tests/Component/File/FinderTest.php
@@ -10,7 +10,7 @@
  */
 class FinderTest extends TestCase
 {
-    public function testPathsGivenAreRecoveredOverExcluded()
+    public function testPathsGivenAreRecoveredOverExcluded(): void
     {
         $exampleRoot = __DIR__ . DIRECTORY_SEPARATOR . 'examples';
 
@@ -37,7 +37,7 @@ public function testPathsGivenAreRecoveredOverExcluded()
         static::assertSame($expected, $files);
     }
 
-    public function testGivenPathsAreIgnoredRegardingExclusion()
+    public function testGivenPathsAreIgnoredRegardingExclusion(): void
     {
         $exampleRoot = __DIR__ . DIRECTORY_SEPARATOR . 'examples';
         $actualFoundFiles = (new Finder(['php'], ['tests']))->fetch([$exampleRoot]);
diff --git a/tests/Component/Issuer/IssuerTest.php b/tests/Component/Issuer/IssuerTest.php
index cf7550c6..7f1107ef 100644
--- a/tests/Component/Issuer/IssuerTest.php
+++ b/tests/Component/Issuer/IssuerTest.php
@@ -5,33 +5,41 @@
 use Hal\Component\Issue\Issuer;
 use Hal\Component\Output\TestOutput;
 use PhpParser\ParserFactory;
+use Polyfill\TestCaseCompatible;
 
 /**
  * @group issue
  */
 class IssuerTest extends \PHPUnit\Framework\TestCase
 {
-    public function testICanEnableIssuerPhp5()
+    use TestCaseCompatible;
+    /**
+     * @requires PHP < 7.0
+     */
+    public function testICanEnableIssuerPhp5(): void
     {
         $output = new TestOutput();
         $issuer = (new TestIssuer($output))->enable();
         $issuer->set('Firstname', 'Jean-François');
 
         try {
-            trigger_error('Object of class stdClass could not be converted to string', E_USER_ERROR);
+            trigger_error('Object of class stdClass could not be converted to string', E_USER_WARNING);
         } catch (\Exception $e) {
         }
 
-        $this->assertContains('Object of class stdClass could not be converted to string', $issuer->log);
-        $this->assertContains('Operating System', $issuer->log);
-        $this->assertContains('Details', $issuer->log);
-        $this->assertContains('https://github.com/phpmetrics/PhpMetrics/issues/new', $output->output);
-        $this->assertContains('Firstname: Jean-François', $issuer->log);
-        $this->assertContains('IssuerTest.php (line 21)', $issuer->log);
+        $this->assertStringContainsString('Object of class stdClass could not be converted to string', $issuer->log);
+        $this->assertStringContainsString('Operating System', $issuer->log);
+        $this->assertStringContainsString('Details', $issuer->log);
+        $this->assertStringContainsString('https://github.com/phpmetrics/PhpMetrics/issues/new', $output->output);
+        $this->assertStringContainsString('Firstname: Jean-François', $issuer->log);
+        $this->assertStringContainsString('IssuerTest.php (line 26)', $issuer->log);
         $issuer->disable();
     }
 
-    public function testIssuerDisplayStatements()
+    /**
+     * @requires PHP < 7.0
+     */
+    public function testIssuerDisplayStatements(): void
     {
         $output = new TestOutput();
         $issuer = (new TestIssuer($output))->enable();
@@ -39,7 +47,7 @@ public function testIssuerDisplayStatements()
 <?php
 class A{
    public function foo() {
-   
+
    }
 }
 EOT;
@@ -54,7 +62,7 @@ public function foo() {
         }
 
         $issuer->disable();
-        $this->assertContains('class A', $issuer->log);
+        $this->assertStringContainsString('class A', $issuer->log);
     }
 }
 
diff --git a/tests/Component/Tree/GraphDeduplicatedTest.php b/tests/Component/Tree/GraphDeduplicatedTest.php
index 139000e0..03ee7563 100644
--- a/tests/Component/Tree/GraphDeduplicatedTest.php
+++ b/tests/Component/Tree/GraphDeduplicatedTest.php
@@ -12,7 +12,7 @@
 class GraphDeduplicatedTest extends \PHPUnit\Framework\TestCase
 {
 
-    public function testEdgeDeduplication()
+    public function testEdgeDeduplication(): void
     {
         $graph = new GraphDeduplicated();
         $a = new Node('A');
diff --git a/tests/Component/Tree/GraphTest.php b/tests/Component/Tree/GraphTest.php
index bc12875c..1f8aabfc 100644
--- a/tests/Component/Tree/GraphTest.php
+++ b/tests/Component/Tree/GraphTest.php
@@ -10,7 +10,7 @@
  */
 class GraphTest extends \PHPUnit\Framework\TestCase
 {
-    public function testICanAddEdge()
+    public function testICanAddEdge(): void
     {
         $graph = new Graph();
         $a = new Node('node_a');
@@ -27,11 +27,9 @@ public function testICanAddEdge()
         $this->assertSame($b, $a->getEdges()[0]->getTo());
     }
 
-    /**
-     * @expectedException \LogicException
-     */
-    public function testICanAddEdgeWithUnexistantFromNode()
+    public function testICanAddEdgeWithUnexistantFromNode(): void
     {
+        $this->expectException(\LogicException::class);
         $graph = new Graph();
         $a = new Node('A');
         $b = new Node('B');
@@ -40,11 +38,9 @@ public function testICanAddEdgeWithUnexistantFromNode()
         $graph->addEdge($a, $b);
     }
 
-    /**
-     * @expectedException \LogicException
-     */
-    public function testICanAddEdgeWithUnexistantToNode()
+    public function testICanAddEdgeWithUnexistantToNode(): void
     {
+        $this->expectException(\LogicException::class);
         $graph = new Graph();
         $a = new Node('A');
         $b = new Node('B');
@@ -53,18 +49,16 @@ public function testICanAddEdgeWithUnexistantToNode()
         $graph->addEdge($a, $b);
     }
 
-    /**
-     * @expectedException \LogicException
-     */
-    public function testICanInsertSameNodeTwice()
+    public function testICanInsertSameNodeTwice(): void
     {
+        $this->expectException(\LogicException::class);
         $graph = new Graph();
         $node = new Node('A');
         $graph->insert($node);
         $graph->insert($node);
     }
 
-    public function testICanListEdges()
+    public function testICanListEdges(): void
     {
         $graph = new Graph();
         $a = new Node('A');
@@ -77,7 +71,7 @@ public function testICanListEdges()
         $this->assertCount(1, $graph->getEdges());
     }
 
-    public function testEdgeIsAddedToFromAndToNode()
+    public function testEdgeIsAddedToFromAndToNode(): void
     {
         $graph = new Graph();
         $a = new Node('A');
@@ -96,7 +90,7 @@ public function testEdgeIsAddedToFromAndToNode()
     }
 
 
-    public function testICanListRootNodes()
+    public function testICanListRootNodes(): void
     {
         $graph = new Graph();
         $a = new Node('A'); // root
diff --git a/tests/Component/Tree/HashMapTest.php b/tests/Component/Tree/HashMapTest.php
index 16b81004..b37d5779 100644
--- a/tests/Component/Tree/HashMapTest.php
+++ b/tests/Component/Tree/HashMapTest.php
@@ -11,7 +11,7 @@
 class HashMapTest extends \PHPUnit\Framework\TestCase
 {
 
-    public function testICanWorkWithHashMap()
+    public function testICanWorkWithHashMap(): void
     {
         $hash = new HashMap;
         $hash
@@ -28,7 +28,7 @@ public function testICanWorkWithHashMap()
         $this->assertEquals($node2, $hash->get('B'));
     }
 
-    public function testICanIterateThroughHashMap()
+    public function testICanIterateThroughHashMap(): void
     {
         $hash = new HashMap;
         $hash
diff --git a/tests/Component/Tree/NodeTest.php b/tests/Component/Tree/NodeTest.php
index cb6f2996..588c368f 100644
--- a/tests/Component/Tree/NodeTest.php
+++ b/tests/Component/Tree/NodeTest.php
@@ -10,7 +10,7 @@
  */
 class NodeTest extends \PHPUnit\Framework\TestCase
 {
-    public function testICanWorkWithNode()
+    public function testICanWorkWithNode(): void
     {
         $node = new Node('A');
         $to = new Node('B');
diff --git a/tests/Component/Tree/Operator/CycleDetectorTest.php b/tests/Component/Tree/Operator/CycleDetectorTest.php
index ab0986b8..87f5be52 100644
--- a/tests/Component/Tree/Operator/CycleDetectorTest.php
+++ b/tests/Component/Tree/Operator/CycleDetectorTest.php
@@ -11,7 +11,7 @@
  */
 class CycleDetectorTest extends \PHPUnit\Framework\TestCase
 {
-    public function testCycleIsDetected()
+    public function testCycleIsDetected(): void
     {
         $graph = new Graph();
         $a = new Node('A');
@@ -45,7 +45,7 @@ public function testCycleIsDetected()
         $this->assertFalse($f->cyclic);
     }
 
-    public function testAllCyclesAreFound()
+    public function testAllCyclesAreFound(): void
     {
         $graph = new Graph();
         $a = new Node('A');
@@ -79,7 +79,7 @@ public function testAllCyclesAreFound()
         $this->assertTrue($f->cyclic);
     }
 
-    public function testCycleIsNotDetected()
+    public function testCycleIsNotDetected(): void
     {
         $graph = new Graph();
         $a = new Node('A');
@@ -112,7 +112,7 @@ public function testCycleIsNotDetected()
         $this->assertFalse($f->cyclic);
     }
 
-    public function testPartCycleIsDetected()
+    public function testPartCycleIsDetected(): void
     {
         $graph = new Graph();
         $a = new Node('A');
diff --git a/tests/Component/Tree/Operator/SizeOfTreeTest.php b/tests/Component/Tree/Operator/SizeOfTreeTest.php
index 10b62ef3..3db8befd 100644
--- a/tests/Component/Tree/Operator/SizeOfTreeTest.php
+++ b/tests/Component/Tree/Operator/SizeOfTreeTest.php
@@ -13,12 +13,10 @@
 class SizeOfTreeTest extends \PHPUnit\Framework\TestCase
 {
 
-    /**
-     * @expectedException  LogicException
-     * @expectedExceptionMessage Cannot get size informations of cyclic graph
-     */
-    public function testICannotGetInfoAboutGraphWhenItIsCyclic()
+    public function testICannotGetInfoAboutGraphWhenItIsCyclic(): void
     {
+        $this->expectException(\LogicException::class);
+        $this->expectExceptionMessage('Cannot get size informations of cyclic graph');
         $graph = new Graph();
         $a = new Node('A');
         $b = new Node('B');
@@ -32,7 +30,7 @@ public function testICannotGetInfoAboutGraphWhenItIsCyclic()
         $size = new SizeOfTree($graph);
     }
 
-    public function testICanGetDepthOfNode()
+    public function testICanGetDepthOfNode(): void
     {
         $graph = new Graph();
         $a = new Node('A');
@@ -58,7 +56,7 @@ public function testICanGetDepthOfNode()
         $this->assertEquals(1, $size->getDepthOfNode($e));
     }
 
-    public function testICanGetNbChildsOfNode()
+    public function testICanGetNbChildsOfNode(): void
     {
         $graph = new Graph();
         $a = new Node('A');
@@ -84,7 +82,7 @@ public function testICanGetNbChildsOfNode()
         $this->assertEquals(0, $size->getNumberOfChilds($e));
     }
 
-    public function testICanGetInfoAboutAverageHeightOfTree()
+    public function testICanGetInfoAboutAverageHeightOfTree(): void
     {
         $graph = new Graph();
         $a = new Node('A');
diff --git a/tests/Metric/Class_/ClassEnumVisitorTest.php b/tests/Metric/Class_/ClassEnumVisitorTest.php
index 76cb6c89..5e721117 100644
--- a/tests/Metric/Class_/ClassEnumVisitorTest.php
+++ b/tests/Metric/Class_/ClassEnumVisitorTest.php
@@ -22,7 +22,7 @@ public function testMethodsAreFoundAndCountedAccordingTheirRole(
         $nbMethodsPrivate,
         $nbMethodsPublic,
         $nbMethodsIncludingGettersSetters
-    ) {
+    ): void {
         $code = file_get_contents($example);
         $metrics = $this->analyzeCode($code);
 
@@ -73,7 +73,7 @@ private function analyzeCode($code)
         return $metrics;
     }
 
-    public function testAnonymousClassIsHandledCorrectly()
+    public function testAnonymousClassIsHandledCorrectly(): void
     {
         $code = '<?php new class {};';
         $metrics = $this->analyzeCode($code);
@@ -84,7 +84,7 @@ public function testAnonymousClassIsHandledCorrectly()
     /**
      * @link https://github.com/phpmetrics/PhpMetrics/issues/238
      */
-    public function testDynamicAttributeClassIsHandledCorrectly()
+    public function testDynamicAttributeClassIsHandledCorrectly(): void
     {
         $code = '
 class A {
@@ -105,7 +105,7 @@ public function foo() {
     /**
      * @link https://github.com/phpmetrics/PhpMetrics/issues/238#issuecomment-292466274
      */
-    public function testDynamicAttributeClassIsHandledCorrectly2()
+    public function testDynamicAttributeClassIsHandledCorrectly2(): void
     {
         $code = '<?php
 namespace Blackprism\CouchbaseODM\Observer;
@@ -130,28 +130,28 @@ public function isTracked(): bool;
         $this->assertInstanceOf(Metrics::class, $metrics);
     }
 
-    public function testItDoesNotMarkClassesAsAbstract()
+    public function testItDoesNotMarkClassesAsAbstract(): void
     {
         $code = '<?php class Foo {}';
         $metrics = $this->analyzeCode($code);
         $this->assertFalse($metrics->get('Foo')->get('abstract'));
     }
 
-    public function testItMarksAbstractClassesAsAbstract()
+    public function testItMarksAbstractClassesAsAbstract(): void
     {
         $code = '<?php abstract class Foo {}';
         $metrics = $this->analyzeCode($code);
         $this->assertTrue($metrics->get('Foo')->get('abstract'));
     }
 
-    public function testItMarksInterfacesAsAbstract()
+    public function testItMarksInterfacesAsAbstract(): void
     {
         $code = '<?php interface Foo {}';
         $metrics = $this->analyzeCode($code);
         $this->assertTrue($metrics->get('Foo')->get('abstract'));
     }
 
-    public function testItMarksTraitsAsAbstract()
+    public function testItMarksTraitsAsAbstract(): void
     {
         $code = '<?php trait Foo {}';
         $metrics = $this->analyzeCode($code);
diff --git a/tests/Metric/Class_/Complexity/CyclomaticComplexityVisitorTest.php b/tests/Metric/Class_/Complexity/CyclomaticComplexityVisitorTest.php
index 2f0c523d..fe104122 100644
--- a/tests/Metric/Class_/Complexity/CyclomaticComplexityVisitorTest.php
+++ b/tests/Metric/Class_/Complexity/CyclomaticComplexityVisitorTest.php
@@ -13,7 +13,7 @@ class CyclomaticComplexityVisitorTest extends \PHPUnit\Framework\TestCase
     /**
      * @dataProvider provideExamplesForCcn
      */
-    public function testCcnOfClassesIsWellCalculated($example, $classname, $expectedCcn)
+    public function testCcnOfClassesIsWellCalculated($example, $classname, $expectedCcn): void
     {
         $metrics = new Metrics();
 
@@ -33,7 +33,7 @@ public function testCcnOfClassesIsWellCalculated($example, $classname, $expected
     /**
      * @dataProvider provideExamplesForWmc
      */
-    public function testWeightedMethodCountOfClassesIsWellCalculated($example, $classname, $expectedWmc)
+    public function testWeightedMethodCountOfClassesIsWellCalculated($example, $classname, $expectedWmc): void
     {
         $metrics = new Metrics();
 
@@ -53,7 +53,7 @@ public function testWeightedMethodCountOfClassesIsWellCalculated($example, $clas
     /**
      * @dataProvider provideExamplesForMaxCc
      */
-    public function testMaximalCyclomaticComplexityOfMethodsIsWellCalculated($example, $classname, $expectedCcnMethodMax)
+    public function testMaximalCyclomaticComplexityOfMethodsIsWellCalculated($example, $classname, $expectedCcnMethodMax): void
     {
         $metrics = new Metrics();
 
diff --git a/tests/Metric/Class_/Complexity/KanDefectVisitorTest.php b/tests/Metric/Class_/Complexity/KanDefectVisitorTest.php
index e78c51b5..4bc4922a 100644
--- a/tests/Metric/Class_/Complexity/KanDefectVisitorTest.php
+++ b/tests/Metric/Class_/Complexity/KanDefectVisitorTest.php
@@ -16,7 +16,7 @@ class KanDefectVisitorTest extends \PHPUnit\Framework\TestCase
     /**
      * @dataProvider provideExamples
      */
-    public function testLackOfCohesionOfMethodsIsWellCalculated($example, $classname, $expected)
+    public function testLackOfCohesionOfMethodsIsWellCalculated($example, $classname, $expected): void
     {
         $metrics = new Metrics();
 
@@ -33,7 +33,7 @@ public function testLackOfCohesionOfMethodsIsWellCalculated($example, $classname
         $this->assertSame($expected, $metrics->get($classname)->get('kanDefect'));
     }
 
-    public function provideExamples()
+    public static function provideExamples()
     {
         return [
             [ __DIR__ . '/../../examples/kan1.php', 'A', .89],
diff --git a/tests/Metric/Class_/Complexity/SystemComplexityVisitorTest.php b/tests/Metric/Class_/Complexity/SystemComplexityVisitorTest.php
index 91b5522d..ee1d9647 100644
--- a/tests/Metric/Class_/Complexity/SystemComplexityVisitorTest.php
+++ b/tests/Metric/Class_/Complexity/SystemComplexityVisitorTest.php
@@ -16,7 +16,7 @@ class SystemComplexityVisitorTest extends \PHPUnit\Framework\TestCase
     /**
      * @dataProvider provideExamples
      */
-    public function testLackOfCohesionOfMethodsIsWellCalculated($filename, $class, $rdc, $rsc, $rsysc)
+    public function testLackOfCohesionOfMethodsIsWellCalculated($filename, $class, $rdc, $rsc, $rsysc): void
     {
         $metrics = new Metrics();
 
@@ -35,7 +35,7 @@ public function testLackOfCohesionOfMethodsIsWellCalculated($filename, $class, $
         $this->assertSame($rsysc, $metrics->get('A')->get('relativeSystemComplexity'));
     }
 
-    public function provideExamples()
+    public static function provideExamples()
     {
         return [
             [ __DIR__ . '/../../examples/systemcomplexity1.php', 'A', 0.5, 36.0, 36.5],
diff --git a/tests/Metric/Class_/Component/MaintainabilityIndexVisitorTest.php b/tests/Metric/Class_/Component/MaintainabilityIndexVisitorTest.php
index 0a7b3524..0bb0144a 100644
--- a/tests/Metric/Class_/Component/MaintainabilityIndexVisitorTest.php
+++ b/tests/Metric/Class_/Component/MaintainabilityIndexVisitorTest.php
@@ -2,6 +2,7 @@
 namespace Test\Hal\Metric\Class_\Structural;
 
 use Hal\Metric\Class_\Component\MaintainabilityIndexVisitor;
+use Hal\Metric\ClassMetric;
 use Hal\Metric\Metrics;
 use PhpParser\ParserFactory;
 
@@ -15,30 +16,16 @@ class MaintainabilityIndexVisitorTest extends \PHPUnit\Framework\TestCase
     /**
      * @dataProvider provideValues
      */
-    public function testLackOfCohesionOfMethodsIsWellCalculated($ccn, $lloc, $cloc, $volume, $mIwoC, $mi, $commentWeight)
+    public function testLackOfCohesionOfMethodsIsWellCalculated($ccn, $lloc, $cloc, $volume, $mIwoC, $mi, $commentWeight): void
     {
         $metrics = new Metrics();
-        $prophet = $this->prophesize('Hal\Metric\ClassMetric');
-        $prophet->getName()->willReturn('A');
-        $prophet->get('lloc')->willReturn($lloc);
-        $prophet->get('loc')->willReturn($lloc + $cloc);
-        $prophet->get('ccn')->willReturn($ccn);
-        $prophet->get('cloc')->willReturn($cloc);
-        $prophet->get('volume')->willReturn($volume);
-
-        // spy
-        $prophet->set('mIwoC', $mIwoC)->will(function () use ($prophet) {
-            return $prophet->reveal();
-        })->shouldBeCalled();
-        $prophet->set('mi', $mi)->will(function () use ($prophet) {
-            return $prophet->reveal();
-        })->shouldBeCalled();
-        $prophet->set('commentWeight', $commentWeight)->will(function () use ($prophet) {
-            return $prophet->reveal();
-        })->shouldBeCalled();
-
-        $class = $prophet->reveal();
-        $metrics->attach($class);
+        $classMetrics = new ClassMetric('A');
+        $classMetrics->set('lloc', $lloc);
+        $classMetrics->set('loc', $lloc + $cloc);
+        $classMetrics->set('ccn', $ccn);
+        $classMetrics->set('cloc', $cloc);
+        $classMetrics->set('volume', $volume);
+        $metrics->attach($classMetrics);
 
         $parser = (new ParserFactory)->create(ParserFactory::PREFER_PHP7);
         $traverser = new \PhpParser\NodeTraverser();
@@ -46,17 +33,22 @@ public function testLackOfCohesionOfMethodsIsWellCalculated($ccn, $lloc, $cloc,
         $traverser->addVisitor(new MaintainabilityIndexVisitor($metrics));
 
         $code = <<<EOT
-<?php class A {
-    public function foo() {
-    
+    <?php class A {
+        public function foo() {
+
+        }
     }
-}
 EOT;
         $stmts = $parser->parse($code);
         $traverser->traverse($stmts);
+
+        // And now, mi, mIwoC and commentWeight should be set
+        $this->assertEquals($mi, $classMetrics->get('mi'));
+        $this->assertEquals($mIwoC, $classMetrics->get('mIwoC'));
+        $this->assertEquals($commentWeight, $classMetrics->get('commentWeight'));
     }
 
-    public function provideValues()
+    public static function provideValues()
     {
         return [
             //    CC    LLOC    CLOC        Volume      MIwoC      mi          commentWeight
diff --git a/tests/Metric/Class_/Coupling/ExternalsVisitorTest.php b/tests/Metric/Class_/Coupling/ExternalsVisitorTest.php
index 8c51dfc2..5d656dda 100644
--- a/tests/Metric/Class_/Coupling/ExternalsVisitorTest.php
+++ b/tests/Metric/Class_/Coupling/ExternalsVisitorTest.php
@@ -16,7 +16,7 @@ class ExternalsVisitorTest extends \PHPUnit\Framework\TestCase
     /**
      * @dataProvider provideExamples
      */
-    public function testDependenciesAreFound($example, $classname, $expected)
+    public function testDependenciesAreFound($example, $classname, $expected): void
     {
         $metrics = new Metrics();
 
@@ -33,7 +33,7 @@ public function testDependenciesAreFound($example, $classname, $expected)
         $this->assertSame($expected, $metrics->get($classname)->get('externals'));
     }
 
-    public function provideExamples()
+    public static function provideExamples()
     {
         return [
             [ __DIR__ . '/../../examples/externals1.php', 'A', ['H', 'C', 'B', 'D']],
@@ -52,7 +52,7 @@ public function provideExamples()
     /**
      * @dataProvider provideExamplesAnnotation
      */
-    public function testDependenciesAreFoundEvenInAnnotation($example, $classname, $expected)
+    public function testDependenciesAreFoundEvenInAnnotation($example, $classname, $expected): void
     {
         $metrics = new Metrics();
 
@@ -69,7 +69,7 @@ public function testDependenciesAreFoundEvenInAnnotation($example, $classname, $
         $this->assertSame($expected, $metrics->get($classname)->get('externals'));
     }
 
-    public function provideExamplesAnnotation()
+    public static function provideExamplesAnnotation()
     {
         return [
             [ __DIR__ . '/../../examples/annotations1.php', 'C\\A', ['A\\Route', 'B\\Json']],
diff --git a/tests/Metric/Class_/Structural/LcomVisitorTest.php b/tests/Metric/Class_/Structural/LcomVisitorTest.php
index ad3a2525..af87f57d 100644
--- a/tests/Metric/Class_/Structural/LcomVisitorTest.php
+++ b/tests/Metric/Class_/Structural/LcomVisitorTest.php
@@ -11,7 +11,7 @@ class LcomVisitorTest extends \PHPUnit\Framework\TestCase
     /**
      * @dataProvider provideExamples
      */
-    public function testLackOfCohesionOfMethodsIsWellCalculated($example, $classname, $expected)
+    public function testLackOfCohesionOfMethodsIsWellCalculated($example, $classname, $expected): void
     {
         $metrics = new Metrics();
 
@@ -28,7 +28,7 @@ public function testLackOfCohesionOfMethodsIsWellCalculated($example, $classname
         $this->assertEquals($expected, $metrics->get($classname)->get('lcom'));
     }
 
-    public function provideExamples()
+    public static function provideExamples()
     {
         return [
             [ __DIR__ . '/../../examples/lcom1.php', 'MyClassA', 2]
diff --git a/tests/Metric/Class_/Text/HalsteadVisitorTest.php b/tests/Metric/Class_/Text/HalsteadVisitorTest.php
index 63f0cf3d..e9f38e41 100644
--- a/tests/Metric/Class_/Text/HalsteadVisitorTest.php
+++ b/tests/Metric/Class_/Text/HalsteadVisitorTest.php
@@ -15,7 +15,7 @@ class HalsteadVisitorTest extends \PHPUnit\Framework\TestCase
     /**
      * @dataProvider provideExamples
      */
-    public function testLackOfCohesionOfMethodsIsWellCalculated($example, $functionName, $nbOperators, $nbOperands, $difficulty)
+    public function testLackOfCohesionOfMethodsIsWellCalculated($example, $functionName, $nbOperators, $nbOperands, $difficulty): void
     {
         $metrics = new Metrics();
 
@@ -46,7 +46,7 @@ public function testLackOfCohesionOfMethodsIsWellCalculated($example, $functionN
         );
     }
 
-    public function provideExamples()
+    public static function provideExamples()
     {
         return [
             [ __DIR__ . '/../../examples/halstead1.php', 'twice', 2, 3, 1.5],
diff --git a/tests/Metric/Class_/Text/LengthVisitorTest.php b/tests/Metric/Class_/Text/LengthVisitorTest.php
index f83caf46..252e2426 100644
--- a/tests/Metric/Class_/Text/LengthVisitorTest.php
+++ b/tests/Metric/Class_/Text/LengthVisitorTest.php
@@ -15,7 +15,7 @@ class LengthVisitorTest extends \PHPUnit\Framework\TestCase
     /**
      * @dataProvider provideExamples
      */
-    public function testLineCountsAreWellCalculated($example, $functionName, $loc, $lloc, $cloc)
+    public function testLineCountsAreWellCalculated($example, $functionName, $loc, $lloc, $cloc): void
     {
         $metrics = new Metrics();
 
@@ -34,7 +34,7 @@ public function testLineCountsAreWellCalculated($example, $functionName, $loc, $
         $this->assertEquals($loc, $metrics->get($functionName)->get('loc'));
     }
 
-    public function provideExamples()
+    public static function provideExamples()
     {
         return [
             [ __DIR__ . '/../../examples/loc1.php', 'A', 21, 13, 8],
diff --git a/tests/Metric/Helper/RoleOfMethodDetectorTest.php b/tests/Metric/Helper/RoleOfMethodDetectorTest.php
index af16be3c..5e542d56 100644
--- a/tests/Metric/Helper/RoleOfMethodDetectorTest.php
+++ b/tests/Metric/Helper/RoleOfMethodDetectorTest.php
@@ -16,7 +16,7 @@ class RoleOfMethodDetectorTest extends \PHPUnit\Framework\TestCase
     /**
      * @dataProvider provideExamples
      */
-    public function testICanDetectRoleOfMethod($expected, $code)
+    public function testICanDetectRoleOfMethod($expected, $code): void
     {
         $parser = (new ParserFactory)->create(ParserFactory::PREFER_PHP7);
         $stmt = $parser->parse($code);
@@ -35,7 +35,7 @@ public function testICanDetectRoleOfMethod($expected, $code)
         }
     }
 
-    public function provideExamples()
+    public static function provideExamples()
     {
         $examples = [
             'getter' => ['getter', '<?php class A { function getName(){ return $this->name; } }  ?>'],
diff --git a/tests/Metric/Package/PackageAbstractionTest.php b/tests/Metric/Package/PackageAbstractionTest.php
index cc427112..e51ab369 100644
--- a/tests/Metric/Package/PackageAbstractionTest.php
+++ b/tests/Metric/Package/PackageAbstractionTest.php
@@ -15,7 +15,7 @@
  */
 class PackageAbstractionTest extends TestCase
 {
-    public function testItCalculatesTheAbstractionOfEachPackage()
+    public function testItCalculatesTheAbstractionOfEachPackage(): void
     {
         $metrics = $this->metricsOf([
             $this->aPackage('SemiAbstract\\', [
diff --git a/tests/Metric/Package/PackageCollectingVisitorTest.php b/tests/Metric/Package/PackageCollectingVisitorTest.php
index aa8c49d5..8d9536a3 100644
--- a/tests/Metric/Package/PackageCollectingVisitorTest.php
+++ b/tests/Metric/Package/PackageCollectingVisitorTest.php
@@ -17,7 +17,7 @@
  */
 class PackageCollectingVisitorTest extends TestCase
 {
-    public function testItUsesThePackageAndTheSubpackageAnnotationAsPackageName()
+    public function testItUsesThePackageAndTheSubpackageAnnotationAsPackageName(): void
     {
         $metrics = $this->analyzeCode(<<<'CODE'
 <?php
@@ -37,7 +37,7 @@ class ClassA
         $this->assertSame('PackA\\SubA\\', $metrics->get('PackageA\\ClassA')->get('package'));
     }
 
-    public function testItUsesThePackageAnnotationAsPackageNameIfNoSubpackageAnnotationExist()
+    public function testItUsesThePackageAnnotationAsPackageNameIfNoSubpackageAnnotationExist(): void
     {
         $metrics = $this->analyzeCode(<<<'CODE'
 <?php
@@ -56,7 +56,7 @@ class ClassA
         $this->assertSame('PackA\\', $metrics->get('PackageA\\ClassA')->get('package'));
     }
 
-    public function testItUsesTheNamespaceAsPackageNameIfNoPackageAnnotationAreAvailable()
+    public function testItUsesTheNamespaceAsPackageNameIfNoPackageAnnotationAreAvailable(): void
     {
         $metrics = $this->analyzeCode(<<<'CODE'
 <?php
diff --git a/tests/Metric/Package/PackageDependenciesTest.php b/tests/Metric/Package/PackageDependenciesTest.php
index da74d85c..9a3df34f 100644
--- a/tests/Metric/Package/PackageDependenciesTest.php
+++ b/tests/Metric/Package/PackageDependenciesTest.php
@@ -14,7 +14,7 @@
  */
 class PackageDependenciesTest extends TestCase
 {
-    public function testItCollectsAllIncomingAndOutgoingPackageDependencies()
+    public function testItCollectsAllIncomingAndOutgoingPackageDependencies(): void
     {
         $packageA = new PackageMetric('PackageA\\');
         $packageB = new PackageMetric('PackageB\\');
@@ -45,7 +45,7 @@ public function testItCollectsAllIncomingAndOutgoingPackageDependencies()
         $this->assertSame(['PackageA\\'], $packageB->getIncomingPackageDependencies());
     }
 
-    public function testItSkipsClassesThatHasNoDependencies()
+    public function testItSkipsClassesThatHasNoDependencies(): void
     {
         $classMetric = (new ClassMetric('OneClass'))->set('package', 'PackageA\\');
         $metrics = $this->getMockBuilder(Metrics::class)->disableOriginalConstructor()->getMock();
@@ -57,7 +57,7 @@ public function testItSkipsClassesThatHasNoDependencies()
         (new PackageDependencies())->calculate($metrics);
     }
 
-    public function testItSkipsClassesThatHasNoPackage()
+    public function testItSkipsClassesThatHasNoPackage(): void
     {
         $classMetric = (new ClassMetric('OneClass'))->set('externals', ['AnotherClass']);
         $metrics = $this->getMockBuilder(Metrics::class)->disableOriginalConstructor()->getMock();
diff --git a/tests/Metric/Package/PackageDistanceTest.php b/tests/Metric/Package/PackageDistanceTest.php
index 205f2166..294791e5 100644
--- a/tests/Metric/Package/PackageDistanceTest.php
+++ b/tests/Metric/Package/PackageDistanceTest.php
@@ -20,7 +20,7 @@ class PackageDistanceTest extends TestCase
      * @param float|null $abstraction
      * @param float|null $expectedDistance
      */
-    public function testItCalculatesTheNormalizedDistanceOfAllPackages($instability, $abstraction, $expectedDistance)
+    public function testItCalculatesTheNormalizedDistanceOfAllPackages($instability, $abstraction, $expectedDistance): void
     {
         $metrics = new Metrics();
         $metrics->attach(new ClassMetric('Ignored'));
diff --git a/tests/Metric/Package/PackageInstabilityTest.php b/tests/Metric/Package/PackageInstabilityTest.php
index 2eceac59..70b7514a 100644
--- a/tests/Metric/Package/PackageInstabilityTest.php
+++ b/tests/Metric/Package/PackageInstabilityTest.php
@@ -13,7 +13,7 @@
  */
 class PackageInstabilityTest extends TestCase
 {
-    public function testItCalculatesTheInstabilityOfEachPackage()
+    public function testItCalculatesTheInstabilityOfEachPackage(): void
     {
         $packageA = new PackageMetric('PackageA\\');
         $packageB = new PackageMetric('PackageB\\');
@@ -37,7 +37,7 @@ public function testItCalculatesTheInstabilityOfEachPackage()
         $this->assertSame(0.0, $packageC->getInstability());
     }
 
-    public function testItStoresTheInstabilityOfTheDependentPackagesOfEachPackage()
+    public function testItStoresTheInstabilityOfTheDependentPackagesOfEachPackage(): void
     {
         $packageA = new PackageMetric('PackageA\\');
         $packageB = new PackageMetric('PackageB\\');
@@ -61,7 +61,7 @@ public function testItStoresTheInstabilityOfTheDependentPackagesOfEachPackage()
         $this->assertSame([], $packageC->getDependentInstabilities());
     }
 
-    public function testItDoesNotCrashIfOnePackageHasNoIncomingAndNoOutgoingDependencies()
+    public function testItDoesNotCrashIfOnePackageHasNoIncomingAndNoOutgoingDependencies(): void
     {
         $package = new PackageMetric('PackageA\\');
 
diff --git a/tests/Metric/PackageMetricTest.php b/tests/Metric/PackageMetricTest.php
index 88e5e609..422953bc 100644
--- a/tests/Metric/PackageMetricTest.php
+++ b/tests/Metric/PackageMetricTest.php
@@ -8,12 +8,12 @@
 
 class PackageMetricTest extends TestCase
 {
-    public function testItIsAMetric()
+    public function testItIsAMetric(): void
     {
         $this->assertInstanceOf(Metric::class, new PackageMetric('PackageName\\'));
     }
 
-    public function testItAppendsClasses()
+    public function testItAppendsClasses(): void
     {
         $metric = new PackageMetric('PackageName\\');
 
@@ -26,7 +26,7 @@ public function testItAppendsClasses()
         $this->assertSame(['Foo', 'Bar'], $metric->getClasses());
     }
 
-    public function testItMayHasAnAbstraction()
+    public function testItMayHasAnAbstraction(): void
     {
         $metric = new PackageMetric('PackageName\\');
         $this->assertNull($metric->getAbstraction());
@@ -35,7 +35,7 @@ public function testItMayHasAnAbstraction()
         $this->assertSame(0.8, $metric->getAbstraction());
     }
 
-    public function testItMayHasAnInstability()
+    public function testItMayHasAnInstability(): void
     {
         $metric = new PackageMetric('PackageName\\');
         $this->assertNull($metric->getInstability());
@@ -44,7 +44,7 @@ public function testItMayHasAnInstability()
         $this->assertSame(0.8, $metric->getInstability());
     }
 
-    public function testItHasAUniqueListOfOutgoingClassDependencies()
+    public function testItHasAUniqueListOfOutgoingClassDependencies(): void
     {
         $metric = new PackageMetric('PackageName\\');
         $this->assertSame([], $metric->getOutgoingClassDependencies());
@@ -55,14 +55,14 @@ public function testItHasAUniqueListOfOutgoingClassDependencies()
         $this->assertSame(['PackageA\\AnyClass'], $metric->getOutgoingClassDependencies());
     }
 
-    public function testItDoesNotAddClassesOfItselfAsOutgoingClassDependencies()
+    public function testItDoesNotAddClassesOfItselfAsOutgoingClassDependencies(): void
     {
         $metric = new PackageMetric('PackageA\\');
         $metric->addOutgoingClassDependency('PackageA\\AnyClass', 'PackageA\\');
         $this->assertSame([], $metric->getOutgoingClassDependencies());
     }
 
-    public function testItHasAUniqueListOfOutgoingPackageDependencies()
+    public function testItHasAUniqueListOfOutgoingPackageDependencies(): void
     {
         $metric = new PackageMetric('PackageName\\');
         $this->assertSame([], $metric->getOutgoingPackageDependencies());
@@ -73,14 +73,14 @@ public function testItHasAUniqueListOfOutgoingPackageDependencies()
         $this->assertSame(['PackageA\\'], $metric->getOutgoingPackageDependencies());
     }
 
-    public function testItDoesNotAddItselfAsOutgoingClassDependencies()
+    public function testItDoesNotAddItselfAsOutgoingClassDependencies(): void
     {
         $metric = new PackageMetric('PackageA\\');
         $metric->addOutgoingClassDependency('PackageA\\AnyClass', 'PackageA\\');
         $this->assertSame([], $metric->getOutgoingPackageDependencies());
     }
 
-    public function testItHasAUniqueListOfIncomingClassDependencies()
+    public function testItHasAUniqueListOfIncomingClassDependencies(): void
     {
         $metric = new PackageMetric('PackageName\\');
         $this->assertSame([], $metric->getOutgoingClassDependencies());
@@ -91,14 +91,14 @@ public function testItHasAUniqueListOfIncomingClassDependencies()
         $this->assertSame(['PackageA\\AnyClass'], $metric->getIncomingClassDependencies());
     }
 
-    public function testItDoesNotAddClassesOfItselfAsIncomingClassDependencies()
+    public function testItDoesNotAddClassesOfItselfAsIncomingClassDependencies(): void
     {
         $metric = new PackageMetric('PackageA\\');
         $metric->addIncomingClassDependency('PackageA\\AnyClass', 'PackageA\\');
         $this->assertSame([], $metric->getIncomingClassDependencies());
     }
 
-    public function testItHasAUniqueListOfIncomingPackageDependencies()
+    public function testItHasAUniqueListOfIncomingPackageDependencies(): void
     {
         $metric = new PackageMetric('PackageName\\');
         $this->assertSame([], $metric->getIncomingPackageDependencies());
@@ -109,14 +109,14 @@ public function testItHasAUniqueListOfIncomingPackageDependencies()
         $this->assertSame(['PackageA\\'], $metric->getIncomingPackageDependencies());
     }
 
-    public function testItDoesNotAddItselfAsIncomingClassDependencies()
+    public function testItDoesNotAddItselfAsIncomingClassDependencies(): void
     {
         $metric = new PackageMetric('PackageA\\');
         $metric->addIncomingClassDependency('PackageA\\AnyClass', 'PackageA\\');
         $this->assertSame([], $metric->getIncomingPackageDependencies());
     }
 
-    public function testItMayHasADistanceAndANormalizedDistance()
+    public function testItMayHasADistanceAndANormalizedDistance(): void
     {
         $metric = new PackageMetric('PackageA\\');
         $this->assertNull($metric->getDistance());
@@ -127,7 +127,7 @@ public function testItMayHasADistanceAndANormalizedDistance()
         $this->assertSame(1/sqrt(2), $metric->getDistance());
     }
 
-    public function testItMyaHasDependentInstabilities()
+    public function testItMyaHasDependentInstabilities(): void
     {
         $metric = new PackageMetric('PackageB\\');
         $this->assertSame([], $metric->getDependentInstabilities());
diff --git a/tests/Metric/System/UnitTesting/UnitTestingTest.php b/tests/Metric/System/UnitTesting/UnitTestingTest.php
index 31514f6d..0b80bacd 100644
--- a/tests/Metric/System/UnitTesting/UnitTestingTest.php
+++ b/tests/Metric/System/UnitTesting/UnitTestingTest.php
@@ -11,7 +11,7 @@
 class UnitTestingTest extends \PHPUnit\Framework\TestCase
 {
 
-    public function testICanParseJunitXmlFile()
+    public function testICanParseJunitXmlFile(): void
     {
         $config = new Config();
         $config->set('junit', __DIR__ . '/xml/junit1.xml');
@@ -31,11 +31,9 @@ public function testICanParseJunitXmlFile()
         $this->assertEquals(6, $tests['Test\Hal\Component\Issue\IssuerTest']->assertions);
     }
 
-    /**
-     * @expectedException Hal\Application\Config\ConfigException
-     */
-    public function testExceptionIsThrownIfJunitFileDoesNotExist()
+    public function testExceptionIsThrownIfJunitFileDoesNotExist(): void
     {
+        $this->expectException(\Hal\Application\Config\ConfigException::class);
         $config = new Config();
         $config->set('junit', __DIR__ . '/xml/junit-not-found.xml');
         $unit = new UnitTesting($config, []);
@@ -43,7 +41,7 @@ public function testExceptionIsThrownIfJunitFileDoesNotExist()
         $unit->calculate($metrics);
     }
 
-    public function testICanParseCodeceptionFile()
+    public function testICanParseCodeceptionFile(): void
     {
         $config = new Config();
         $config->set('junit', __DIR__ . '/xml/codeception1.xml');
diff --git a/tests/Polyfill/TestCaseCompatible.php b/tests/Polyfill/TestCaseCompatible.php
new file mode 100644
index 00000000..0c4ff2f9
--- /dev/null
+++ b/tests/Polyfill/TestCaseCompatible.php
@@ -0,0 +1,19 @@
+<?php
+
+namespace Polyfill;
+
+if (!method_exists(\PHPUnit\Framework\Assert::class, 'assertStringContainsString')) {
+    trait TestCaseCompatible
+    {
+        public function assertStringContainsString($needle, $haystack, $message = '')
+        {
+            $this->assertContains($needle, $haystack, $message);
+        }
+    }
+} else {
+    trait TestCaseCompatible
+    {
+    }
+}
+
+
diff --git a/tests/Polyfill/each.php b/tests/Polyfill/each.php
new file mode 100644
index 00000000..bfc53169
--- /dev/null
+++ b/tests/Polyfill/each.php
@@ -0,0 +1,38 @@
+<?php
+
+//
+// This code is a copy of https://github.com/ChristiaanBye/polyfill-each
+// @see https://github.com/ChristiaanBye/polyfill-each/blob/master/LICENSE
+//
+// @licence MIT
+// @author ChristiaanBye
+//
+if (!function_exists('each')) {
+    /**
+     * @param array $array Although the actual function accepted objects, it was discouraged to pass them. Hence for the
+     *                     shim only an array is supported.
+     *
+     * @return array|false
+     */
+    function each(array &$array)
+    {
+        $key   = key($array);
+        $value = current($array);
+
+        if ($key === null) {
+            // key() returns null if the array pointer is beyond the list of element or if the array is empty. If the
+            // same scenario occurred in the each() function, a false was returned instead. Hence returning false here
+            return false;
+        }
+
+        // Advance the array pointer before returning
+        next($array);
+
+        return array(
+            1       => $value,
+            'value' => $value,
+            0       => $key,
+            'key'   => $key
+        );
+    }
+}
diff --git a/tests/Polyfill/testcase.php b/tests/Polyfill/testcase.php
new file mode 100644
index 00000000..0a8727ca
--- /dev/null
+++ b/tests/Polyfill/testcase.php
@@ -0,0 +1,8 @@
+<?php
+
+/**
+ * Polyfill for PHPUnit\Framework\TestCase vs PHPUnit_Framework_TestCase
+ */
+if (!class_exists('PHPUnit\Framework\TestCase') && class_exists('PHPUnit_Framework_TestCase')) {
+    class_alias('PHPUnit_Framework_TestCase', 'PHPUnit\Framework\TestCase');
+}
diff --git a/tests/Report/Html/ComplexityReportRegressionTest.php b/tests/Report/Html/ComplexityReportRegressionTest.php
index 70e58062..b4187802 100644
--- a/tests/Report/Html/ComplexityReportRegressionTest.php
+++ b/tests/Report/Html/ComplexityReportRegressionTest.php
@@ -20,7 +20,7 @@ class ComplexityReportRegressionTest extends TestCase
     /**
      * @dataProvider tableHeaderDataProvider
      */
-    public function testComplexityHtmlReportContainsCorrectOrderOfTableColumns($junitEnabled, $expectedTableHeader)
+    public function testComplexityHtmlReportContainsCorrectOrderOfTableColumns($junitEnabled, $expectedTableHeader): void
     {
         $config = new Config();
         $output = new TestOutput();
@@ -54,7 +54,7 @@ public function testComplexityHtmlReportContainsCorrectOrderOfTableColumns($juni
         $this->assertEquals($expectedTableHeader, $actualTableHeader);
     }
 
-    public function tableHeaderDataProvider()
+    public static function tableHeaderDataProvider()
     {
         $defaultTableHeader = [
             'Class',
@@ -80,12 +80,24 @@ public function tableHeaderDataProvider()
 
     private function getActualTableHeader($content)
     {
-        $tableHeaderColumnNodes = (new Crawler($content))
-            ->filterXPath('.//table[contains(concat(" ",normalize-space(@class)," ")," js-sort-table ")]/thead/tr')
-            ->children();
+        $dom = new \DOMDocument();
+        @$dom->loadHTML($content);
 
-        return array_map(function (DomNode $node) {
-            return $node->textContent;
-        }, iterator_to_array($tableHeaderColumnNodes));
+        $xpath = new \DOMXPath($dom);
+        $rows = $xpath->query('//table[contains(concat(" ",normalize-space(@class)," ")," js-sort-table ")]/thead/tr');
+
+        if ($rows->length === 0) {
+            return [];
+        }
+
+        $headerRow = $rows->item(0);
+        $headers = [];
+        foreach ($headerRow->childNodes as $node) {
+            if ($node->nodeType === XML_ELEMENT_NODE) {
+                $headers[] = $node->textContent;
+            }
+        }
+
+        return $headers;
     }
 }
diff --git a/tests/Report/Html/ReporterTest.php b/tests/Report/Html/ReporterTest.php
index 1d52aa5b..42d8bedb 100644
--- a/tests/Report/Html/ReporterTest.php
+++ b/tests/Report/Html/ReporterTest.php
@@ -8,6 +8,7 @@
 use Hal\Metric\Metrics;
 use Hal\Report\Html\Reporter;
 use PHPUnit\Framework\TestCase;
+use Polyfill\TestCaseCompatible;
 
 /**
  * @group reporter
@@ -15,7 +16,9 @@
  */
 class ReporterTest extends TestCase
 {
-    public function testICanGenerateHtmlReport()
+    use TestCaseCompatible;
+
+    public function testICanGenerateHtmlReport(): void
     {
         $config = new Config();
         $output = new TestOutput();
@@ -46,6 +49,6 @@ public function testICanGenerateHtmlReport()
 
         // ensure basic content is generated
         $content = file_get_contents(sprintf('%s/index.html', $destination));
-        $this->assertContains('PhpMetrics report', $content);
+        $this->assertStringContainsString('PhpMetrics report', $content);
     }
 }
diff --git a/tests/Search/SearchFactoryTest.php b/tests/Search/SearchFactoryTest.php
index 811ff49e..68a7c0e6 100644
--- a/tests/Search/SearchFactoryTest.php
+++ b/tests/Search/SearchFactoryTest.php
@@ -11,7 +11,7 @@
 class SearchFactoryTest extends TestCase
 {
 
-    public function testIShoulBeAbleToFactorySearches()
+    public function testIShoulBeAbleToFactorySearches(): void
     {
         $config = [
             'search1' => [
diff --git a/tests/Search/SearchTest.php b/tests/Search/SearchTest.php
index a6d96048..8a63a08c 100644
--- a/tests/Search/SearchTest.php
+++ b/tests/Search/SearchTest.php
@@ -14,7 +14,7 @@
 class SearchTest extends TestCase
 {
 
-    public function testSearchCanReduceSearchByName()
+    public function testSearchCanReduceSearchByName(): void
     {
         $config = [
             'nameMatches' => 'awesome'
@@ -31,7 +31,7 @@ public function testSearchCanReduceSearchByName()
         $this->assertTrue($search->matches($metric));
     }
 
-    public function testSearchCanReduceSearchByType()
+    public function testSearchCanReduceSearchByType(): void
     {
         $config = [
             'type' => 'class'
@@ -49,7 +49,7 @@ public function testSearchCanReduceSearchByType()
     /**
      * @dataProvider providesMetrics
      */
-    public function testSearchCanReduceSearchByMetric($searchExpression, $value, $expected)
+    public function testSearchCanReduceSearchByMetric($searchExpression, $value, $expected): void
     {
         $config = [
             'ccn' => $searchExpression
@@ -66,7 +66,7 @@ public function testSearchCanReduceSearchByMetric($searchExpression, $value, $ex
         $this->assertEquals($expected, $search->matches($metric));
     }
 
-    public function providesMetrics()
+    public static function providesMetrics()
     {
         return [
             ['>=2.5', 6, true],
diff --git a/tests/Violation/Class_/BlobTest.php b/tests/Violation/Class_/BlobTest.php
index be8da94c..abc71323 100644
--- a/tests/Violation/Class_/BlobTest.php
+++ b/tests/Violation/Class_/BlobTest.php
@@ -14,7 +14,7 @@ class BlobTest extends \PHPUnit\Framework\TestCase
     /**
      * @dataProvider provideExamples
      */
-    public function testGlobIsFound($expected, $nbMethodsPublic, $lcom, $nbExternals)
+    public function testGlobIsFound($expected, $nbMethodsPublic, $lcom, $nbExternals): void
     {
         $class = $this->getMockBuilder(ClassMetric::class)->disableOriginalConstructor()->getMock();
 
@@ -42,7 +42,7 @@ public function testGlobIsFound($expected, $nbMethodsPublic, $lcom, $nbExternals
         $this->assertEquals($expected, $class->get('violations')->count());
     }
 
-    public function provideExamples()
+    public static function provideExamples()
     {
         return [
             [1, 9, 3, 10],
diff --git a/tests/Violation/Package/StableAbstractionsPrincipleTest.php b/tests/Violation/Package/StableAbstractionsPrincipleTest.php
index 17351468..820d4a15 100644
--- a/tests/Violation/Package/StableAbstractionsPrincipleTest.php
+++ b/tests/Violation/Package/StableAbstractionsPrincipleTest.php
@@ -13,15 +13,19 @@
  */
 class StableAbstractionsPrincipleTest extends TestCase
 {
-    public function testItIgnoresNonPackageMetrics()
+    public function testItIgnoresNonPackageMetrics(): void
     {
-        $metric = $this->prophesize(Metric::class);
+        $metric = $this->getMockBuilder(Metric::class)
+            ->disableOriginalConstructor()
+            ->getMock();
 
-        $object = new StableAbstractionsPrinciple();
+        $metric->expects($this->never())
+            ->method('get')
+            ->with('violations');
 
-        $object->apply($metric->reveal());
+        $object = new StableAbstractionsPrinciple();
 
-        $metric->get('violations')->shouldNotHaveBeenCalled();
+        $object->apply($metric);
     }
 
     /**
@@ -30,7 +34,7 @@ public function testItIgnoresNonPackageMetrics()
      * @param float $instability
      * @param int $expectedViolationCount
      */
-    public function testItAddsViolationsIfAPackageIsEitherStableAndConcreteOrInstableAndAbstract($abstractness, $instability, $expectedViolationCount)
+    public function testItAddsViolationsIfAPackageIsEitherStableAndConcreteOrInstableAndAbstract($abstractness, $instability, $expectedViolationCount): void
     {
         $metric = new PackageMetric('package');
         $metric->set('violations', new Violations());
diff --git a/tests/Violation/Package/StableDependenciesPrincipleTest.php b/tests/Violation/Package/StableDependenciesPrincipleTest.php
index 4eb870f4..7e554fc5 100644
--- a/tests/Violation/Package/StableDependenciesPrincipleTest.php
+++ b/tests/Violation/Package/StableDependenciesPrincipleTest.php
@@ -13,7 +13,7 @@
  */
 class StableDependenciesPrincipleTest extends TestCase
 {
-    public function testItIgnoresNonPackageMetrics()
+    public function testItIgnoresNonPackageMetrics(): void
     {
         $metric = $this->getMockBuilder(Metric::class)->getMock();
         $metric->expects($this->never())->method('get');
@@ -32,7 +32,7 @@ public function testItAddsViolationsIfOneDependentPackageIsMoreUnstableOrAsUnsta
         $packageInstability,
         array $dependentInstabilities,
         $expectedViolationCount
-    ) {
+    ): void {
         $violations = new Violations();
         $metric = $this->getMockBuilder(PackageMetric::class)->disableOriginalConstructor()->getMock();
         $metric->method('getInstability')->willReturn($packageInstability);
diff --git a/tests/binary/BinTest.php b/tests/binary/BinTest.php
index aada20b1..24897f0a 100644
--- a/tests/binary/BinTest.php
+++ b/tests/binary/BinTest.php
@@ -4,23 +4,24 @@
 /**
  * @group binary
  */
-class BinFileTest extends \PHPUnit\Framework\TestCase
+class BinTest extends \PHPUnit\Framework\TestCase
 {
     private $phar;
 
-    public function setUp()
+    public function setUp(): void
     {
+        parent::setUp();
         $this->phar = __DIR__ . '/../../bin/phpmetrics';
     }
 
-    public function testICanRunBinFile()
+    public function testICanRunBinFile(): void
     {
         $command = sprintf('%s --version', $this->phar);
         $r = shell_exec($command);
         $this->assertContains('PhpMetrics', $r);
     }
 
-    public function testICanProvideOneDirectoryToParse()
+    public function testICanProvideOneDirectoryToParse(): void
     {
         $command = sprintf('%s --exclude="" %s 2>&1', $this->phar, __DIR__ . '/examples/1');
         $r = shell_exec($command);
@@ -29,7 +30,7 @@ public function testICanProvideOneDirectoryToParse()
         $this->assertRegExp('!Classes\s+2!', $r);
     }
 
-    public function testICanProvideMultipleDirectoriesToParse()
+    public function testICanProvideMultipleDirectoriesToParse(): void
     {
         $command = sprintf(
             '%s --exclude="" %s,%s  2>&1',
diff --git a/tests/binary/PharTest.php b/tests/binary/PharTest.php
index cecb304b..52a06fb2 100644
--- a/tests/binary/PharTest.php
+++ b/tests/binary/PharTest.php
@@ -8,19 +8,20 @@ class PharTest extends \PHPUnit\Framework\TestCase
 {
     private $phar;
 
-    public function setUp()
+    public function setUp(): void
     {
+        parent::setUp();
         $this->phar = __DIR__ . '/../../releases/phpmetrics.phar';
     }
 
-    public function testICanRunPhar()
+    public function testICanRunPhar(): void
     {
         $command = sprintf('%s --version', $this->phar);
         $r = shell_exec($command);
         $this->assertContains('PhpMetrics', $r);
     }
 
-    public function testICanProvideOneDirectoryToParse()
+    public function testICanProvideOneDirectoryToParse(): void
     {
         $command = sprintf('%s --exclude="" %s 2>&1', $this->phar, __DIR__ . '/examples/1');
         $r = shell_exec($command);
@@ -29,7 +30,7 @@ public function testICanProvideOneDirectoryToParse()
         $this->assertRegExp('!Classes\s+2!', $r);
     }
 
-    public function testICanProvideMultipleDirectoriesToParse()
+    public function testICanProvideMultipleDirectoriesToParse(): void
     {
         $command = sprintf(
             '%s --exclude="" %s,%s  2>&1',
diff --git a/tests/binary/ReportTest.php b/tests/binary/ReportTest.php
index 351d9048..c8f045b9 100644
--- a/tests/binary/ReportTest.php
+++ b/tests/binary/ReportTest.php
@@ -8,19 +8,20 @@ class BinReportTest extends \PHPUnit\Framework\TestCase
 {
     private $phar;
 
-    public function setUp()
+    public function setUp(): void
     {
+        parent::setUp();
         $this->phar = __DIR__ . '/../../bin/phpmetrics';
     }
 
-    public function testICanRunBinFile()
+    public function testICanRunBinFile(): void
     {
         $command = sprintf('%s --version', $this->phar);
         $r = shell_exec($command);
         $this->assertContains('PhpMetrics', $r);
     }
 
-    public function testICanProvideOneDirectoryToParse()
+    public function testICanProvideOneDirectoryToParse(): void
     {
         $command = sprintf('%s --exclude="" %s 2>&1', $this->phar, __DIR__ . '/examples/1');
         $r = shell_exec($command);
@@ -29,7 +30,7 @@ public function testICanProvideOneDirectoryToParse()
         $this->assertRegExp('!Classes\s+2!', $r);
     }
 
-    public function testICanProvideMultipleDirectoriesToParse()
+    public function testICanProvideMultipleDirectoriesToParse(): void
     {
         $command = sprintf(
             '%s --exclude="" %s,%s  2>&1',
@@ -43,7 +44,7 @@ public function testICanProvideMultipleDirectoriesToParse()
         $this->assertRegExp('!Classes\s+4!', $r);
     }
 
-    public function testICanGenerateCsvReport()
+    public function testICanGenerateCsvReport(): void
     {
         $destination = '/tmp/report.csv';
         if (file_exists($destination)) {
@@ -60,7 +61,7 @@ public function testICanGenerateCsvReport()
         $this->assertFileExists($destination);
     }
 
-    public function testICanGenerateJsonReport()
+    public function testICanGenerateJsonReport(): void
     {
         $destination = '/tmp/report.json';
         if (file_exists($destination)) {
diff --git a/tests/bootstrap.php b/tests/bootstrap.php
new file mode 100644
index 00000000..dc2a6a2a
--- /dev/null
+++ b/tests/bootstrap.php
@@ -0,0 +1,12 @@
+<?php
+
+require_once __DIR__ . '/../vendor/autoload.php';
+
+// polyfill for methods of phpunit
+require_once __DIR__ . '/Polyfill/TestCaseCompatible.php';
+
+// polyfill for each() function
+require_once __DIR__ . '/Polyfill/each.php';
+
+// polyfill for \PHPUnit\Framework\TestCase vs \PHPUnit_Framework_TestCase
+require_once __DIR__ . '/Polyfill/testcase.php';
diff --git a/tooling/README.md b/tooling/README.md
new file mode 100644
index 00000000..7daa4e64
--- /dev/null
+++ b/tooling/README.md
@@ -0,0 +1,5 @@
+# Tooling
+
+This folder contains external dependencies used for building and testing the project only.
+
+It allows avoiding conflicts with the main project dependencies and to keep the project clean.
diff --git a/tooling/composer.json b/tooling/composer.json
new file mode 100644
index 00000000..51eab6b9
--- /dev/null
+++ b/tooling/composer.json
@@ -0,0 +1,19 @@
+{
+    "name": "phpmetrics/tooling",
+    "license": "MIT",
+    "autoload": {
+        "psr-4": {
+            "Phpmetrics\\Tooling\\": "src/"
+        }
+    },
+    "authors": [
+        {
+            "name": "Jean-François Lépine",
+            "email": "lepinejeanfrancois@gmail.com"
+        }
+    ],
+    "require-dev": {
+        "rector/rector": "^2.1",
+        "friendsofphp/php-cs-fixer": "^3.76"
+    }
+}

From a980a7a3df652f1eadc12e3589f57d30b43cf227 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jean-Fran=C3=A7ois=20L=C3=A9pine?=
 <lepinejeanfrancois@gmail.com>
Date: Tue, 1 Jul 2025 06:55:12 +0200
Subject: [PATCH 2/2] Updated tests in order to be executed in PHP 8.4

---
 tooling/composer.json | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/tooling/composer.json b/tooling/composer.json
index 51eab6b9..03d18c2a 100644
--- a/tooling/composer.json
+++ b/tooling/composer.json
@@ -8,8 +8,7 @@
     },
     "authors": [
         {
-            "name": "Jean-François Lépine",
-            "email": "lepinejeanfrancois@gmail.com"
+            "name": "Jean-François Lépine"
         }
     ],
     "require-dev": {
