Checks whether features are overridden.

@throws \Exception
If cm.features.no-overrides is true, and there are features overrides
an exception will be thrown.
188796
protected function checkFeaturesOverrides() {
    if ($this->getConfigValue('cm.features.no-overrides')) {
      // @codingStandardsIgnoreStart
      $this->say("Checking for features overrides...");
      if ($this->getConfig()->has('cm.features.bundle')) {
        $task = $this->taskDrush()->stopOnFail();
        foreach ($this->getConfigValue('cm.features.bundle') as $bundle) {
          $task->drush("fl")
            ->option('bundle', $bundle)
            ->option('format', 'json');
          $result = $task->printOutput(TRUE)->run();

          if (!$result->wasSuccessful()) {
            throw new BltException("Unable to determine if features in bundle $bundle are overridden.");
          }

          $output = $result->getMessage();
          $features_overridden = preg_match('/(changed|conflicts|added)( *)$/', $output);
          if ($features_overridden) {
            throw new BltException("A feature in the $bundle bundle is overridden. You must re-export this feature to incorporate the changes.");
          }
        }
      }
    }
    // @codingStandardsIgnoreEnd
  }
987775
public function hasFeature($feature)
    {
        return (isset($this->_aFeatures[$feature]) && !is_null($this->_aFeatures[$feature]));
    }
335726
public function overrideBlockTypeContainerSettings()
    {
        if (!isset($this->cbOverrideBlockTypeContainerSettings) || !$this->cbOverrideBlockTypeContainerSettings) {
            $this->cbOverrideBlockTypeContainerSettings = 0;
        }

        return $this->cbOverrideBlockTypeContainerSettings;
    }
568688
private void overrideUseMavenPatterns(T overrider, Class overriderClass) {
        if (useMavenPatternsOverrideList.contains(overriderClass.getSimpleName())) {
            try {
                Field useMavenPatternsField = overriderClass.getDeclaredField("useMavenPatterns");
                useMavenPatternsField.setAccessible(true);
                Object useMavenPatterns = useMavenPatternsField.get(overrider);

                if (useMavenPatterns == null) {
                    Field notM2CompatibleField = overriderClass.getDeclaredField("notM2Compatible");
                    notM2CompatibleField.setAccessible(true);
                    Object notM2Compatible = notM2CompatibleField.get(overrider);
                    if (notM2Compatible instanceof Boolean && notM2Compatible != null) {
                        useMavenPatternsField.set(overrider, !(Boolean)notM2Compatible);
                    }
                }
            } catch (NoSuchFieldException | IllegalAccessException e) {
                converterErrors.add(getConversionErrorMessage(overrider, e));
            }
        }
    }
411784
final protected function checkImmutability(): void
    {
        $this->checkCallConstraints();

        $class = static::class;

        if (isset(static::$immutabilityCheckMap[$class])) {
            return;
        }

        $this->checkPropertiesAccessibility();
        $this->checkMethodsAccessibility();

        static::$immutabilityCheckMap[$class] = true;
    }
875274
protected function verifyMajorRevision()
    {
        $majorRevision = ($this->readInteger() >> 16);

        if ($majorRevision !== 0 && $majorRevision !== 1) {
            fclose($this->file);
            throw new \Exception(
                sprintf(
                    '%s has an unknown major revision',
                    $this->filename
                )
            );
        }
    }
101538
public function isEnable()
    {
        if (!$this->mPDFExists() || !$this->collection()->getSize()) {
            return false;
        }

        return $this->hasConfig(self::ENABLE);
    }
1181331
public function restore()
    {
        // Restore settings before last override and delete override from stash
        if ($this->overrides) {
            $old = array_pop($this->overrides);
            $this->apply($old, $purge = true);

            return true;
        }

        return false;
    }
322995
private function checkRequired()
    {
        // Loop through all params
        foreach ($this->params as $param) {
            if (array_key_exists('required', $param) && $param['required'] == true) {
                if (!array_key_exists($param['name'], $this->pinputs)) {
                    throw new \Exception('Parameter "' . $param['name'] . '" is required');
                }
            }
        }

        // Loop through all options
        foreach ($this->options as $key => $option) {
            // if option is required
            if (array_key_exists('required', $option) && $option['required'] == true) {
                // check that it is defined in pinputs
                if ($this->pinputs[$option['short']] == false) {
                    throw new \Exception('Option "' . $option['help'] . '" is required');
                }
            }
        }

    }
353065
protected function setOverrides()
    {
        $config = $this->app['config']->get('cartalyst.sentinel');

        $users = $config['users']['model'];

        $roles = $config['roles']['model'];

        $persistences = $config['persistences']['model'];

        if (class_exists($users)) {
            if (method_exists($users, 'setRolesModel')) {
                forward_static_call_array([ $users, 'setRolesModel' ], [ $roles ]);
            }

            if (method_exists($users, 'setPersistencesModel')) {
                forward_static_call_array([ $users, 'setPersistencesModel' ], [ $persistences ]);
            }

            if (method_exists($users, 'setPermissionsClass')) {
                forward_static_call_array([ $users, 'setPermissionsClass' ], [ $config['permissions']['class'] ]);
            }
        }

        if (class_exists($roles) && method_exists($roles, 'setUsersModel')) {
            forward_static_call_array([ $roles, 'setUsersModel' ], [ $users ]);
        }

        if (class_exists($persistences) && method_exists($persistences, 'setUsersModel')) {
            forward_static_call_array([ $persistences, 'setUsersModel' ], [ $users ]);
        }
    }
87574
public function checkUpdatesSettings()
    {
        $ret = true;
        foreach ($this->_updates as $update) {
            $e = false;
            try {
                $update->checkSettings();
            } catch (Exception $e) {
                throw $e; //no special handling for now, maybe something better should be done
                $ret = false;
            }
        }
        return $ret;
    }
1153003
public function isEnabled()
    {
        if ($this->enabled === null) {
            $config = $this->app['config'];
            $configEnabled = value($config->get('debugbar.enabled'));

            if ($configEnabled === null) {
                $configEnabled = $config->get('app.debug');
            }

            $this->enabled = $configEnabled && !$this->app->runningInConsole() && !$this->app->environment('testing');
        }

        return $this->enabled;
    }
768163
private void processPropertyOverrides() {
    PropertyOverrides propertyOverrides = entityClass.getAnnotation(PropertyOverrides.class);
    if (propertyOverrides == null) {
      return;
    }
    PropertyOverride[] propertyOverridesArray = propertyOverrides.value();
    for (PropertyOverride propertyOverride : propertyOverridesArray) {
      entityMetadata.putPropertyOverride(propertyOverride);
    }
  }
1328568
public function isExempt()
    {
        $ignoreEnvs = $this->app['config']->get('maintenancemode.exempt-environments', []);

        if(is_array($ignoreEnvs) && in_array($this->app->environment(), $ignoreEnvs))
        {
            return true;
        }

        // We did not have a match
        return false;
    }
1193024
public static function checkOnDisk()
    {
        $args = func_get_args();
        if (count($args) == 2)
            $module = $args[0] . DIRECTORY_SEPARATOR . $args[1];
        elseif (count($args) == 1)
            $module = $args[1];
        else
            throw  new \Exception();
        $module = str_replace('\\', DIRECTORY_SEPARATOR, $module);
        return (bool)app('files')->exists(app_path('Modules') . DIRECTORY_SEPARATOR . $module . DIRECTORY_SEPARATOR . 'Module.php');
    }
1313919
protected function isSelectedFeature($featureName) {        
        $isSelected = false;
        foreach ($this->selectedArtifacts as $selectedArtifact)
            if ($featureName === $selectedArtifact->getFeature()->getName())
                $isSelected = true;
        return $isSelected;
    }
738045
public function IsNotFoundDispatched () {
		$toolClass = $this->toolClass;
		$defaultCtrlName = $toolClass::GetDashedFromPascalCase($this->defaultControllerName);
		$errorActionName = $toolClass::GetDashedFromPascalCase($this->defaultControllerNotFoundActionName);
		return $this->request->GetControllerName() == $defaultCtrlName &&
			$this->request->GetActionName() == $errorActionName;
	}