src/Models/UniverseMoonReport.php
Method getMoonIndicatorsAttribute
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getMoonIndicatorsAttribute()
{
if (is_null($this->moon_indicators)) {
$this->moon_indicators = (object) [
'ubiquitous' => $this->content->filter(function ($type) {
Avoid too many return
statements within this method. Open
Open
return $type->marketGroupID == Moon::EXCEPTIONAL;
Avoid too many return
statements within this method. Open
Open
return $this->moon_indicators ?: (object) [
'ubiquitous' => 0,
'common' => 0,
'uncommon' => 0,
'rare' => 0,
Avoid too many return
statements within this method. Open
Open
return ! in_array($type->marketGroupID, [Moon::UBIQUITOUS, Moon::COMMON, Moon::UNCOMMON, Moon::RARE, Moon::EXCEPTIONAL]);