$env = EnvironmentHelper::
getVariable('APP_ENV', 'prod'
);
$feature = self::
normalizeName($feature);
if (self::
$registeredFeatures !==
[] && !
isset(self::
$registeredFeatures[$feature]) &&
$env !== 'prod'
) { trigger_error('Unknown feature "' .
$feature . '"', \E_USER_WARNING
);
} $featureAll = EnvironmentHelper::
getVariable('FEATURE_ALL', ''
);
if (self::
isTrue((string) $featureAll) && (self::
$registeredFeatures ===
[] || \
array_key_exists($feature, self::
$registeredFeatures))) { if ($featureAll === Feature::ALL_MAJOR
) { return true;
} // return true if it's registered and not a major feature
if (isset(self::
$registeredFeatures[$feature]) && (self::
$registeredFeatures[$feature]['major'
] ?? false
) === false
) { return true;
} } if (!EnvironmentHelper::
hasVariable($feature) && !EnvironmentHelper::
hasVariable(\
strtolower($feature))) {