parseTitle example


    public function parseChangelog(string $path): array
    {
        Feature::triggerDeprecationOrThrow('v6.6.0.0', Feature::deprecatedMethodMessage(self::class, __METHOD__, '6.6.0'));

        $releases = [];
        $currentRelease = null;

        foreach ($this->parse($path) as $line) {
            switch ($line[0]) {
                case '#':
                    $currentRelease = $this->parseTitle($line);

                    break;
                case '-':
                case '*':
                    if (!$currentRelease) {
                        throw new PluginChangelogInvalidException($path);
                    }
                    $releases[$currentRelease][] = $this->parseItem($line);

                    break;
            }
        }
Home | Imprint | This part of the site doesn't use cookies.