src/Models/UniverseMoonReport.php

Summary

Maintainability
A
2 hrs
Test Coverage

Method getMoonIndicatorsAttribute has 30 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function getMoonIndicatorsAttribute()
    {
        if (is_null($this->moon_indicators)) {
            $this->moon_indicators = (object) [
                'ubiquitous' => $this->content->filter(function ($type) {
Severity: Minor
Found in src/Models/UniverseMoonReport.php - About 1 hr to fix

    Avoid too many return statements within this method.
    Open

                        return $type->marketGroupID == Moon::EXCEPTIONAL;
    Severity: Major
    Found in src/Models/UniverseMoonReport.php - About 30 mins to fix

      Avoid too many return statements within this method.
      Open

              return $this->moon_indicators ?: (object) [
                  'ubiquitous' => 0,
                  'common' => 0,
                  'uncommon' => 0,
                  'rare' => 0,
      Severity: Major
      Found in src/Models/UniverseMoonReport.php - About 30 mins to fix

        Avoid too many return statements within this method.
        Open

                            return ! in_array($type->marketGroupID, [Moon::UBIQUITOUS, Moon::COMMON, Moon::UNCOMMON, Moon::RARE, Moon::EXCEPTIONAL]);
        Severity: Major
        Found in src/Models/UniverseMoonReport.php - About 30 mins to fix

          There are no issues that match your filters.

          Category
          Status