voyager-admin/voyager

View on GitHub
src/Manager/Plugins.php

Summary

Maintainability
B
5 hrs
Test Coverage
F
51%

Method launchPlugins has 57 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function launchPlugins(?bool $protected = null): void
    {
        $this->getAllPlugins()->each(function (GenericPlugin $plugin) use ($protected) {
            $start = round(microtime(true) * 1000);
            $plugin->stats = [
Severity: Major
Found in src/Manager/Plugins.php - About 2 hrs to fix

    File Plugins.php has 255 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    <?php
    
    namespace Voyager\Admin\Manager;
    
    use Composer\InstalledVersions;
    Severity: Minor
    Found in src/Manager/Plugins.php - About 2 hrs to fix

      Method addPlugin has 37 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function addPlugin(string|GenericPlugin $plugin): void
          {
              $start = round(microtime(true) * 1000);
              if (!$this->enabled_plugins) {
                  $this->loadEnabledPlugins();
      Severity: Minor
      Found in src/Manager/Plugins.php - About 1 hr to fix

        There are no issues that match your filters.

        Category
        Status