✘✘ GRAYBYTE WORDPRESS FILE MANAGER ✘✘

​🇳​​🇦​​🇲​​🇪♯➤ webm004.cluster127.gra.hosting.ovh.net ​🇻​♯➤ 6.18.42-ovh-vps-grsec-zfs+ #1 SMP 🇾​♯➤ 2026

𝗛𝗢𝗠𝗘 𝗜𝗗 ♯➤ 54.36.91.62 ♯➤ 𝗔𝗗𝗠𝗜𝗡 𝗜𝗗 216.73.216.223
𝗢𝗣𝗧𝗜𝗢𝗡𝗦 ♯ CRL ♯➤ 𝗢𝗞 ┃ WGT ♯➤ 𝗢𝗞 ┃ SDO ♯➤ 𝗢𝗙𝗙 ┃ PKEX ♯➤ 𝗢𝗙𝗙
𝗗𝗘𝗔𝗖𝗧𝗜𝗩𝗔𝗧𝗘𝗗 ♯➤ _dyuweyrj4,_dyuweyrj4r,dl

𝗛𝗢𝗠𝗘
𝗖𝗨𝗥𝗥𝗘𝗡𝗧 𝗙𝗜𝗟𝗘 : /home/docteuh/www/plugins/Dtos//VulnerabilitySnapshotDto.php
<?php

declare(strict_types=1);

namespace ReallySimplePlugins\RSS\Core\Features\Vulnerability\Dtos;

use ReallySimplePlugins\RSS\Core\Support\Helpers\Storage;

/**
 * Immutable data transfer object representing a vulnerability snapshot summary.
 *
 * A snapshot captures the aggregated vulnerability state of the system at a
 * specific point in time. It is used to:
 * - Compare the current state against a previously stored snapshot.
 * - Decide whether notifications should be sent (via policy logic).
 * - Persist historical state for idempotent scheduled runs.
 *
 * This DTO contains data only:
 * - No business logic
 * - No persistence logic
 * - No scheduling concerns
 */
final class VulnerabilitySnapshotDto
{
    /**
     * Highest severity label present in the snapshot (or null if none).
     */
    private ?string $highestSeverity;

    /**
     * Normalized numeric severity score used for comparisons.
     */
    private int $severityScore;

    /**
     * Total number of vulnerable components.
     */
    private int $vulnerableCount;

    /**
     * Number of vulnerable components with updates available.
     */
    private int $updatableComponents;

    /**
     * UNIX timestamp when the snapshot was generated.
     */
    private int $generatedAt;

    public function __construct(
        ?string $highestSeverity,
        int $severityScore,
        int $vulnerableCount,
        int $updatableComponents,
        int $generatedAt
    ) {
        $this->highestSeverity = $highestSeverity;
        $this->severityScore = $severityScore;
        $this->vulnerableCount = $vulnerableCount;
        $this->updatableComponents = $updatableComponents;
        $this->generatedAt = $generatedAt;
    }

    /**
     * Returns the highest severity label present in the snapshot (or null if none).
     */
    public function getHighestSeverity(): ?string
    {
        return $this->highestSeverity;
    }

    /**
     * Returns the normalized numeric severity score used for comparisons.
     */
    public function getSeverityScore(): int
    {
        return $this->severityScore;
    }

    /**
     * Returns the total number of vulnerable components.
     */
    public function getVulnerableCount(): int
    {
        return $this->vulnerableCount;
    }

    /**
     * Returns the number of vulnerable components with updates available.
     */
    public function getUpdatableComponents(): int
    {
        return $this->updatableComponents;
    }

    /**
     * Returns the UNIX timestamp when the snapshot was generated.
     */
    public function getGeneratedAt(): int
    {
        return $this->generatedAt;
    }

    /**
     * Returns an array representation of the snapshot intended for persistence (options/storage).
     *
     * The array shape is stable and versioned implicitly by the DTO.
     *
     * @return array{
     *     highestSeverity: ?string,
     *     severityScore: int,
     *     vulnerableCount: int,
     *     updatableComponents: int,
     *     generatedAt: int
     * }
     */
    public function toArray(): array
    {
        return [
            'highestSeverity' => $this->highestSeverity,
            'severityScore' => $this->severityScore,
            'vulnerableCount' => $this->vulnerableCount,
            'updatableComponents' => $this->updatableComponents,
            'generatedAt' => $this->generatedAt,
        ];
    }

    /**
     * Rebuilds a snapshot DTO from persisted storage.
     *
     * Missing keys are handled defensively via the Storage helper.
     *
     * @param array<string, mixed> $data
     */
    public static function fromArray(array $data): self
    {
        $storage = new Storage($data);
        return new self(
            $storage->getString('highestSeverity'),
            $storage->getInt('severityScore'),
            $storage->getInt('vulnerableCount'),
            $storage->getInt('updatableComponents'),
            $storage->getInt('generatedAt'),
        );
    }
}


Current_dir [ 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ] Document_root [ 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ]


[ Back ]
𝗡𝗔𝗠𝗘
𝗦𝗜𝗭𝗘
𝗟𝗔𝗦𝗧 𝗧𝗢𝗨𝗖𝗛
𝗨𝗦𝗘𝗥
𝗦𝗧𝗔𝗧𝗨𝗦
𝗙𝗨𝗡𝗖𝗧𝗜𝗢𝗡𝗦
..
--
22 Sep 2026 9.10 PM
docteuh / users
0755
ComponentVulnerabilitiesDto.php
5.876 KB
18 Jun 2026 6.25 PM
docteuh / users
0644
GridBlock.js
1.118 KB
18 Jun 2026 6.25 PM
docteuh / users
0644
HighestSeverityContextDto.php
4.453 KB
18 Jun 2026 6.25 PM
docteuh / users
0644
InstalledComponentDto.php
3.941 KB
18 Jun 2026 6.25 PM
docteuh / users
0644
LICENSE
1.045 KB
18 Jun 2026 6.25 PM
docteuh / users
0644
ModalControl.js
0.463 KB
18 Jun 2026 6.25 PM
docteuh / users
0644
TaskElement.js
4.363 KB
18 Jun 2026 6.25 PM
docteuh / users
0644
VulnerabilityRangeDto.php
3.996 KB
18 Jun 2026 6.25 PM
docteuh / users
0644
VulnerabilitySnapshotDto.php
3.905 KB
18 Jun 2026 6.25 PM
docteuh / users
0644
class-admin.php
12.73 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
hoverTooltip_bu.js
2.843 KB
18 Jun 2026 6.25 PM
docteuh / users
0644
icon-redirect-manager-20260827192224.svg
1.299 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
xmlrpc.php
1.223 KB
23 Jun 2026 6.19 PM
docteuh / users
0644

✘✘ GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME ✘✘
Static GIF Static GIF