vaimo/composer-patches

View on GitHub
src/Factories/PatchesLoaderFactory.php

Summary

Maintainability
A
2 hrs
Test Coverage

Method create has 63 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function create(LoaderComponents $loaderComponentsPool, PluginConfig $pluginConfig, $devMode = false)
    {
        $installationManager = $this->composer->getInstallationManager();

        $rootPackage = $this->composer->getPackage();
Severity: Major
Found in src/Factories/PatchesLoaderFactory.php - About 2 hrs to fix

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

            $configReaderFactory = new \Vaimo\ComposerPatches\Factories\PatcherConfigReaderFactory(

    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 '113', column '20').
    Open

            return new \Vaimo\ComposerPatches\Patch\DefinitionList\Loader(

    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 '114', column '17').
    Open

                new \Vaimo\ComposerPatches\Package\Collector(

    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 '109', column '35').
    Open

            $srcResolverFactory = new \Vaimo\ComposerPatches\Factories\SourcesResolverFactory(

    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

    Property \Vaimo\ComposerPatches\Factories\PatchesLoaderFactory->composer has undeclared type \Composer\Composer
    Open

        private $composer;
    Severity: Minor
    Found in src/Factories/PatchesLoaderFactory.php by phan

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

            $installationManager = $this->composer->getInstallationManager();
    Severity: Critical
    Found in src/Factories/PatchesLoaderFactory.php by phan

    Parameter $composer has undeclared type \Composer\Composer
    Open

        public function __construct(
    Severity: Minor
    Found in src/Factories/PatchesLoaderFactory.php by phan

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

            $rootPackage = $this->composer->getPackage();
    Severity: Critical
    Found in src/Factories/PatchesLoaderFactory.php by phan

    There are no issues that match your filters.

    Category
    Status