Check for forced edition in config file. If edition is not specified,
determine it by ClassMap existence.

@return string

@throws \Exception
543484
protected function findEdition()
    {
        try {
            $edition = $this->findEditionByConfigFile();
            if (empty($edition)) {
                $edition = $this->findEditionByEditionFiles();
            }
        } catch (\Exception $exception) {
            try {
                $edition = $this->findEditionByEditionFiles();
            } catch (\Exception $exception) {
                throw $exception;
            }
        }

        return strtoupper($edition);
    }
1055142
public static function getVersion()
	{
		$match = array();
		$content = @file_get_contents( dirname( __DIR__ ) . DIRECTORY_SEPARATOR . 'ext_emconf.php' );

		if( preg_match( "/'version' => '([^']+)'/", $content, $match ) === 1 ) {
			return $match[1];
		}

		return '';
	}
1343989
public function getSystemId()
    {
        if (!is_null($this->_systemId)) {
            return $this->_systemId;
        }
        preg_match('/' . ucfirst($this->moduleType) . '([A-Za-z]+)\\\Module/', get_class($this), $matches);
        if (!isset($matches[1])) {
            throw new Exception(get_class($this) . " is not set up correctly!");
        }

        return $this->_systemId = $matches[1];
    }
766695
protected function getMetaForeignKey()
    {
        foreach ($this->builtInClasses as $model => $meta) {
            if ($this instanceof $model) {
                $basename = class_basename($model);

                return sprintf('%s_id', strtolower($basename));
            }
        }

        throw new UnexpectedValueException(sprintf('%s must extends one of Corcel built-in models: Comment, Post, Term or User.', static::class));
    }
727160
public function getVersion()
    {
        $composer = $this->loadJsonFileFromRoot("composer.json");

        if (!isset($composer->version)){
            throw new \Exception("composer.json does not contain a version");
        }

        return $composer->version;
    }
1173664
protected function checkByClassNameAndFlavor()
    {
        $checkFunctionName = 'check_' . $this->className;
        if (!empty($this->flavor)) {
            $checkFunctionName .= '_' . $this->flavor;
        }

        // Check whether a check for the corresponding class exists.
        if (method_exists($this, $checkFunctionName)) {
            $this->$checkFunctionName();
        } else {
            trigger_error(
                'No configuration check ' . $checkFunctionName . ' created yet.'
            );
        }
    }
1195374
public function getSupportedCharsets()
    {
        if ($this->supportedCharsets === null) {
            $supportedCharsets = [];
            $rs = $this->executeQuery('SHOW CHARACTER SET');
            while (($row = $rs->fetch(PDO::FETCH_ASSOC)) !== false) {
                if (!isset($row['Charset']) || !isset($row['Default collation'])) {
                    throw new Exception(t('Unrecognized result of the "%s" database query.', 'SHOW CHARACTER SET'));
                }
                $supportedCharsets[strtolower($row['Charset'])] = strtolower($row['Default collation']);
            }
            $this->supportedCharsets = $supportedCharsets;
        }

        return $this->supportedCharsets;
    }
300050
public function getVerbose()
    {
        $field = EnumRequestOption::VERBOSE;
        return isset($this->options[$field]) ? $this->options[$field] : false;
    }
409082
public function getClassMap()
    {
        $communityEditionSourcePath = $this->facts->getCommunityEditionSourcePath();
        $backwardsCompatibilityClassMapFile = $communityEditionSourcePath . DIRECTORY_SEPARATOR .
                                              'Core' . DIRECTORY_SEPARATOR .
                                              'Autoload' . DIRECTORY_SEPARATOR .
                                              'BackwardsCompatibilityClassMap.php';

        if (!is_readable($backwardsCompatibilityClassMapFile)) {
            throw new \OxidEsales\UnifiedNameSpaceGenerator\Exceptions\InvalidBackwardsCompatibilityClassMapException(
                'Backwards compatibility class map file ' . $backwardsCompatibilityClassMapFile .
                ' is not readable or does not exist',
                static::ERROR_CODE_MISSING_BACKWARDS_COMPATIBILITY_CLASS_MAP
            );
        }

        $backwardsCompatibilityClassMap =
            include $backwardsCompatibilityClassMapFile;

        if (!is_array($backwardsCompatibilityClassMap)) {
            throw new \OxidEsales\UnifiedNameSpaceGenerator\Exceptions\InvalidBackwardsCompatibilityClassMapException(
                'Backwards compatibility class map is not an array ',
                static::ERROR_CODE_INVALID_BACKWARDS_COMPATIBILITY_CLASS_MAP
            );
        }

        return array_flip($backwardsCompatibilityClassMap);
    }
867790
public function __fieldFix()
    {
        $schema = $this->getClassSchema();
        foreach ($this->__calculateSaveDownRows() as $column) {
            if (!isset($schema[$column]['type'])) {
                throw new Exception("No type hinting/docblock found for '{$column}' in '" . get_called_class() . "'.", E_USER_WARNING);
            }

            $type = $schema[$column]['type'];
            if ($type == "integer" && !is_int($this->$column)) {
                $this->$column = intval($this->$column);
            }
        }
        return true;
    }
819009
protected function defaultConstrain(): string
    {
        if (empty($this->defaultConstraint)) {
            $this->defaultConstraint = $this->table . '_' . $this->getName() . '_default_' . uniqid();
        }

        return $this->defaultConstraint;
    }
418990
public function getShopFullEdition()
    {
        $sEdition = $this->getShopEdition();
        $sFullEdition = "Community Edition";
        if ($sEdition == "PE") {
            $sFullEdition = "Professional Edition";
        }

        if ($sEdition == "EE") {
            $sFullEdition = "Enterprise Edition";
        }

        return $sFullEdition;
    }
1231879
public function getTitleSuffix()
    {
        if ($this->getActVendor()->oxvendor__oxshowsuffix->value) {
            return \OxidEsales\Eshop\Core\Registry::getConfig()->getActiveShop()->oxshops__oxtitlesuffix->value;
        }
    }
979516
public function classmap()
    {
        $path = $this->composerPath . $this->classmapName;
        $i = 0;

        if (is_file($path)) {
            $data = include $path;

            foreach ($data as $key => $value) {
                if (false === empty($value)) {
                    $this->libs[addcslashes($key, '\\')] = $value;
                    $i++;
                }
            }

            $this->log[] = 'Imported ' . $i . ' classes from classmap';
            return $i;
        }

        $this->log[] = 'Warn: classmap not found';
        return false;
    }
758686
private function defaultConfiguration() : string
    {
        $supportedFiles = [
            'larastan.neon',
            'phpstan.neon',
            'phpstan.neon.dist',
        ];

        foreach ($supportedFiles as $file) {
            $filePath = base_path($file);

            if (file_exists($filePath)) {
                return $filePath;
            }
        }

        return __DIR__.'/../../extension.neon';
    }
888400
private function getPrecedence()
    {
        $precedence = Preference::ABSENT;

        // Wildcards
        if ('*' === $this->variant) {
            $precedence = Preference::WILDCARD;

        // Special handling for Accept-Language field
        } elseif (Preference::LANGUAGE === $this->fromField && '-*' === substr($this->variant, -2, 2)) {
            $precedence = Preference::PARTIAL_WILDCARD;

        // Full match
        } elseif (strlen($this->variant)) {
            $precedence = Preference::COMPLETE;
        }

        return $precedence;
    }
530615
public function getTitleSuffix()
    {
        if ($this->getActManufacturer()->oxmanufacturers__oxshowsuffix->value) {
            return \OxidEsales\Eshop\Core\Registry::getConfig()->getActiveShop()->oxshops__oxtitlesuffix->value;
        }
    }