<?php
declare(strict_types=1);

namespace PpPhp\Core\Platform\Developer;

use PpPhp\Core\Platform\Kernel\Platform;

final class PlatformInspector
{
    public function inspect(): array
    {
        return [
            'kernel' => Platform::kernel()->toArray(),
            'manifests' => [
                'count' => count(Platform::manifests()->all()),
                'types' => Platform::manifests()->collection()->types(),
                'warnings' => Platform::manifests()->warnings(),
            ],
            'modules' => [
                'count' => Platform::modules()->count(),
                'enabled' => count(Platform::modules()->enabled()),
            ],
            'extensions' => [
                'plugins' => Platform::plugins()->count(),
                'packages' => Platform::packages()->count(),
                'themes' => Platform::themes()->count(),
            ],
        ];
    }
}
