vaimo/composer-patches

View on GitHub
src/Patch/DefinitionList/Loader/ComponentPool.php

Summary

Maintainability
A
2 hrs
Test Coverage

Method getList has 70 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function getList(PluginConfig $pluginConfig)
    {
        $patcherConfig = $pluginConfig->getPatcherConfig();
        $composer = $this->composerContext->getLocalComposer();
        $composerConfig = clone $composer->getConfig();
Severity: Major
Found in src/Patch/DefinitionList/Loader/ComponentPool.php - About 2 hrs to fix

    Missing class import via use statement (line '88', column '37').
    Open

            $composerDependencies = new \Vaimo\ComposerPatches\Compatibility\DependenciesFactory();

    MissingImport

    Since: 2.7.0

    Importing all external classes in a file through use statements makes them clearly visible.

    Example

    function make() {
        return new \stdClass();
    }

    Source http://phpmd.org/rules/cleancode.html#MissingImport

    Missing class import via use statement (line '111', column '32').
    Open

            $consoleSilencer = new \Vaimo\ComposerPatches\Console\Silencer($this->appIO);

    MissingImport

    Since: 2.7.0

    Importing all external classes in a file through use statements makes them clearly visible.

    Example

    function make() {
        return new \stdClass();
    }

    Source http://phpmd.org/rules/cleancode.html#MissingImport

    Missing class import via use statement (line '104', column '36').
    Open

            $composerConfigUtils = new \Vaimo\ComposerPatches\Utils\ComposerConfigUtils();

    MissingImport

    Since: 2.7.0

    Importing all external classes in a file through use statements makes them clearly visible.

    Example

    function make() {
        return new \stdClass();
    }

    Source http://phpmd.org/rules/cleancode.html#MissingImport

    Missing class import via use statement (line '81', column '26').
    Open

                $cache = new \Composer\Cache(

    MissingImport

    Since: 2.7.0

    Importing all external classes in a file through use statements makes them clearly visible.

    Example

    function make() {
        return new \stdClass();
    }

    Source http://phpmd.org/rules/cleancode.html#MissingImport

    Missing class import via use statement (line '97', column '36').
    Open

            $packageInfoResolver = new \Vaimo\ComposerPatches\Package\InfoResolver(

    MissingImport

    Since: 2.7.0

    Importing all external classes in a file through use statements makes them clearly visible.

    Example

    function make() {
        return new \stdClass();
    }

    Source http://phpmd.org/rules/cleancode.html#MissingImport

    Missing class import via use statement (line '106', column '32').
    Open

            $packageResolver = new \Vaimo\ComposerPatches\Composer\Plugin\PackageResolver(

    MissingImport

    Since: 2.7.0

    Importing all external classes in a file through use statements makes them clearly visible.

    Example

    function make() {
        return new \stdClass();
    }

    Source http://phpmd.org/rules/cleancode.html#MissingImport

    Missing class import via use statement (line '101', column '32').
    Open

            $configExtractor = new \Vaimo\ComposerPatches\Package\ConfigExtractors\VendorConfigExtractor(

    MissingImport

    Since: 2.7.0

    Importing all external classes in a file through use statements makes them clearly visible.

    Example

    function make() {
        return new \stdClass();
    }

    Source http://phpmd.org/rules/cleancode.html#MissingImport

    Parameter $appIO has undeclared type \Composer\IO\IOInterface
    Open

        public function __construct(

    Argument 1 (appIO) is \Composer\IO\IOInterface but \Vaimo\ComposerPatches\Console\Silencer::__construct() takes \Composer\IO\ConsoleIO defined at /code/src/Console/Silencer.php:22
    Open

            $consoleSilencer = new \Vaimo\ComposerPatches\Console\Silencer($this->appIO);

    Property \Vaimo\ComposerPatches\Patch\DefinitionList\Loader\ComponentPool->appIO has undeclared type \Composer\IO\IOInterface
    Open

        private $appIO;

    Call to method getConfig from undeclared class \Composer\Composer
    Open

            $composerConfig = clone $composer->getConfig();

    Call to method getInstallationManager from undeclared class \Composer\Composer
    Open

            $installationManager = $composer->getInstallationManager();

    Call to method getPackage from undeclared class \Composer\Composer
    Open

            $rootPackage = $composer->getPackage();

    Call to method __construct from undeclared class \Composer\Cache
    Open

                $cache = new \Composer\Cache(

    Call to method getPackage from undeclared class \Composer\Composer
    Open

                array($composer->getPackage())

    There are no issues that match your filters.

    Category
    Status