vaimo/composer-patches

View on GitHub
src/Factories/PatchesApplierFactory.php

Summary

Maintainability
A
2 hrs
Test Coverage

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

    public function create(PluginConfig $pluginConfig, ListResolver $listResolver, OutputStrategy $outputStrategy)
    {
        $installer = $this->composer->getInstallationManager();
        $downloader = $this->composer->getDownloadManager();

Severity: Major
Found in src/Factories/PatchesApplierFactory.php - About 2 hrs to fix

    Missing class import via use statement (line '63', column '33').
    Open

            $patchFileApplier = new \Vaimo\ComposerPatches\Patch\File\Applier(

    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 '102', column '34').
    Open

            $repositoryManager = new \Vaimo\ComposerPatches\Managers\RepositoryManager(

    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 '96', column '36').
    Open

            $patcherStateManager = new \Vaimo\ComposerPatches\Managers\PatcherStateManager();

    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 '54', 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 '85', column '33').
    Open

            $packageCollector = 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 '108', column '20').
    Open

            return new \Vaimo\ComposerPatches\Repository\PatchesApplier(

    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 '91', column '31').
    Open

            $queueGenerator = new \Vaimo\ComposerPatches\Repository\PatchesApplier\QueueGenerator(

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

            $patchDetailsLogger = new \Vaimo\ComposerPatches\Package\PatchApplier\InfoLogger($this->logger);

    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 '89', column '30').
    Open

            $stateAnalyser = new \Vaimo\ComposerPatches\Repository\State\Analyser();

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

                new \Vaimo\ComposerPatches\Console\Silencer($output)

    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 '70', column '31').
    Open

            $patchProcessor = new \Vaimo\ComposerPatches\Package\PatchApplier\ItemProcessor(

    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 '78', column '36').
    Open

            $packagePatchApplier = new \Vaimo\ComposerPatches\Package\PatchApplier(

    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

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

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

    Parameter $composer has undeclared type \Composer\Composer
    Open

        public function __construct(

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

            $composerConfig = $this->composer->getConfig();
    Severity: Critical
    Found in src/Factories/PatchesApplierFactory.php by phan

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

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

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

            $downloader = $this->composer->getDownloadManager();
    Severity: Critical
    Found in src/Factories/PatchesApplierFactory.php by phan

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

        private $composer;

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

            $eventDispatcher = $this->composer->getEventDispatcher();
    Severity: Critical
    Found in src/Factories/PatchesApplierFactory.php by phan

    There are no issues that match your filters.

    Category
    Status