Check enabled status.

@return bool
431624
public function enabled() : bool
    {
        if ($this->isEnabled !== null) {
            return $this->isEnabled;
        }

        if (!$this->config->get("antispam.{$this->instanceType}.enabled", true)) {
            return $this->isEnabled = false;
        }

        $disabledEnv = (array) $this->config->get("antispam.{$this->instanceType}.disabled_env", []);

        if (in_array($this->config->get('app.env', 'production'), $disabledEnv)) {
            return $this->isEnabled = false;
        }

        if ($this->instanceType === 'recaptcha') {
            if ($this->config->get('antispam.recaptcha.guests_only', false) && $this->request->user() !== null) {
                return $this->isEnabled = false;
            }
        }

        return $this->isEnabled = true;
    }
1248584
public function getStatus() {
        $rest = $this->getService( self::API_SWITCH_STATUS);
        $rest->GET();

        return $rest->getResult( models\SwitchPort\Status::class);
    }
400755
public static function isEnabled()
    {
        $property = App::$Properties->get('debug');
        // $_COOKIE used insted of symfony request, cuz debug initialize early
        return ($property['all'] === true || $_COOKIE[$property['cookie']['key']] === $property['cookie']['value']);
    }
594728
public static function enabled() {
		$loaded = extension_loaded('apc');
		$isCli = (php_sapi_name() === 'cli');
		$enabled = (!$isCli && ini_get('apc.enabled')) || ($isCli && ini_get('apc.enable_cli'));
		return ($loaded && $enabled);
	}
932834
public function check(): bool
  {
    if ( $this->current !== null ){
      // if $on_error is set to E_CONTINUE returns true
      if ( $this->on_error === self::E_CONTINUE ){
        return true;
      }
      // If any connection has an error with mode E_STOP_ALL
      if ( self::$has_error_all && ($this->on_error !== self::E_STOP_ALL) ){
        return false;
      }
      // If this connection has an error with mode E_STOP
      if ( $this->has_error && ($this->on_error !== self::E_STOP) ){
        return false;
      }
      return true;
    }
    return false;
  }
113805
public function getStatus(): bool
    {
        foreach ($this->requestVersion() as $key => $version) {
            if (! Str::contains($key, 'dev')) {
                continue;
            }

            if (version_compare($version['version'], $this->currentVersion, '>')) {
                return true;
            }
        }

        return false;
    }
247337
private function checkUser()
    {
        static $enabled;

        if (!isset($enabled)) {

            $token = $this->tokenStorage->getToken();

            if ($token) {

                $user = $token->getUser();

                if ($user instanceof \FOS\UserBundle\Model\User) {
                    if ($user->hasRole('ROLE_USER'))
                        $enabled = $token->isAuthenticated();
                }
            } else
                $enabled = false;
        }

        return $enabled;
    }
251211
def enabled(self):
        
        # In auto-detection mode color enabled when terminal attached
        if self._mode == COLOR_AUTO:
            return sys.stdout.isatty()
        return self._mode == COLOR_ON
962971
public function status()
    {
        $status = $this->Vault->sys()->status()->json();
        if ($status['initialized'] !== true) {
            $this->warn('Vault is not initialized. Please run the "create" command');
            return false;
        }

        if ($this->Vault->sys()->sealed()) {
            $this->warn('Vault is not unsealed. Please run the "unseal" command');
            return true;
        }

        $this->success('Vault is initialized and unsealed');
        return true;
    }
1139107
public static function isEnabled()
      {
          $ini = eZINI::instance( 'squid.ini' );

          if ( $ini->hasSection( 'Squid' )
                && $ini->hasVariable( 'Squid', 'PurgeCacheOnPublish' )
                    && $ini->variable( 'Squid', 'PurgeCacheOnPublish' ) == 'enabled' )
          {
              return true;
          }
          else
          {
              return false;
          }
      }
535911
private static function get_enabled() {
        global $CFG;

        $active = array();
        if (empty($CFG->antiviruses)) {
            return $active;
        }

        foreach (explode(',', $CFG->antiviruses) as $e) {
            if ($antivirus = self::get_antivirus($e)) {
                if ($antivirus->is_configured()) {
                    $active[$e] = $antivirus;
                }
            }
        }
        return $active;
    }
759430
protected function getStatus()
    {
        if (!$this->getModuleSetting('status')) {
            return false;
        }

        if ($this->getModuleSetting('test')) {
            return $this->getModuleSetting('test_key') && $this->getModuleSetting('test_public_key');
        }

        return $this->getModuleSetting('live_key') && $this->getModuleSetting('live_public_key');
    }
876885
public function actionStatus()
    {
        $pid = $this->getMasterPid();
        Console::stdout("beyod($pid) is running ...\r\n");
        Console::stdout("php ini: ".php_ini_loaded_file()."\r\n");
        Console::stdout("php version: ".phpversion()."\r\n");
        Console::stdout("necessary extensions status:\r\n");
        foreach(['pcntl', 'event', 'posix'] as $ext){
            Console::stdout("\t$ext: \t". (extension_loaded($ext) ? 'yes':'no')."\r\n");
        }
    }
912580
def is_enabled(self):
        
        if self.name in settings.exclude_rules:
            return False
        elif self.name in settings.rules:
            return True
        elif self.enabled_by_default and ALL_ENABLED in settings.rules:
            return True
        else:
            return False
920429
protected function currentStatus()
    {
        if (! $masters = app(MasterSupervisorRepository::class)->all()) {
            return 'inactive';
        }

        return collect($masters)->contains(function ($master) {
            return $master->status === 'paused';
        }) ? 'paused' : 'running';
    }
67205
public function is_enabled() {
        list($componentname, $varname) = $this->get_config_var_name();

        $value = get_config($componentname, $varname . '_enabled');

        // Search areas are enabled by default.
        if ($value === false) {
            $value = 1;
        }
        return (bool)$value;
    }
920147
public function isEnabled()
    {
        return ($c = $this->enabledAttribute) !== null
            ? (boolean) $this->owner->$c
            : (($c = $this->disabledAttribute) !== null ? (boolean) !$this->owner->$c : null);
    }