protected function initProjectDirs(): array
    {
        if ($this->projectDirs === null) {
            $jsonFile = $this->rootDir . \DIRECTORY_SEPARATOR . 'composer.json';
            $dirs     = [
                'app-dir'       => $this->rootDir . \DIRECTORY_SEPARATOR . 'app',
                'config-dir'    => $this->rootDir . \DIRECTORY_SEPARATOR . 'config',
                'database-dir'  => $this->rootDir . \DIRECTORY_SEPARATOR . 'database',
                'public-dir'    => $this->rootDir . \DIRECTORY_SEPARATOR . 'public',
                'resources-dir' => $this->rootDir . \DIRECTORY_SEPARATOR . 'resources',
                'routes-dir'    => $this->rootDir . \DIRECTORY_SEPARATOR . 'routes',
                'tests-dir'     => $this->rootDir . \DIRECTORY_SEPARATOR . 'tests',
                'storage-dir'   => $this->rootDir . \DIRECTORY_SEPARATOR . 'storage',
            ];

            if (\file_exists($jsonFile)) {
                $jsonData = \json_decode(\file_get_contents($jsonFile), true);
                $extra    = $jsonData['extra'] ?? [];

                foreach ($extra as $key => $value) {
                    if (\array_key_exists($key, $dirs)) {
                        $dirs[$key] = $this->rootDir . \DIRECTORY_SEPARATOR . \ltrim($value, '/\\');
                    }
                }
            }

            $this->projectDirs = $dirs;
        }

        return $this->projectDirs;
    }