davereid/drupal-environment

View on GitHub

Showing 4 of 4 total issues

Method getIndicatorConfig has 36 lines of code (exceeds 25 allowed). Consider refactoring.
Open

public static function getIndicatorConfig(): ?array
{
if (static::isProduction()) {
return [
'name' => 'Production',
Severity: Minor
Found in src/DefaultEnvironment.php - About 1 hr to fix

    Function getEnvironmentClass has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
    Open

    public static function getEnvironmentClass(): string
    {
    static $class;
    if (!isset($class)) {
    if ($class = static::get('DRUPAL_ENVIRONMENT_CLASS')) {
    Severity: Minor
    Found in src/Environment.php - About 1 hr to fix

    Avoid too many return statements within this method.
    Open

    return null;
    Severity: Major
    Found in src/DefaultEnvironment.php - About 30 mins to fix

      Avoid too many return statements within this method.
      Open

      return [
      'name' => 'Local',
      'bg_color' => '#505050',
      'fg_color' => '#ffffff',
      ];
      Severity: Major
      Found in src/DefaultEnvironment.php - About 30 mins to fix
        Severity
        Category
        Status
        Source
        Language